MATLAB: How to set the length of an imported series of data sets

data set length

I have 20 windaq voice files i have imported into matlab and i need to set all of the individual data sets to be the same length so i can compute the fft of all of them.
Thanks in advance

Best Answer

If you want all of them to have the same frequency resolution in the Fourier transform, zero-pad the shorter to the length of the longest. So with respect to the documentation in fft (link), ‘NFFT’ would either be the length of the longest, or 2^nextpow2(length(longest)), as you prefer.
Related Question