Hi Karthik, Why can't you just use spectrogram()? You can specify the window length (the number of samples corresponding to 10 msec) as an input.
If you cannot use spectrogram(), you can use reshape() as one option.
Suppose you have an audio signal sampled at 20 kHz.
Then 200 samples is 10 msec.
x = randn(2e4,1);
x = reshape(x,200,100);
You can then apply the Fourier transform to the columns of x.
Better than the above option is buffer(), which allows you to construct overlapping segments.
x = 1:16;
x = buffer(x,4,2)
Again, spectrogram provides a NOVERLAP input argument that handles this easily.
Best Answer