Reputation: 13
I recorded an audio signal (.wav) and I need to convert this signal into a matrix or array using matlab, so i can add it to another one.
[x,fs] = wavread('C:\Users\Amira\Desktop\test222.wav');
fs=44100
length(x) = 339968
How can i sample this signal and covert it to matrix of (N,1) where N=40.
Upvotes: 0
Views: 423
Reputation: 65460
If you only want the first 40 samples of your audio signal, you can simply index into x
:
[x,fs] = wavread('C:\Users\Amira\Desktop\test222.wav');
first40 = x(1:40);
Upvotes: 1