Fft(x,n) when n>length(x)

I am trying to extract the n-point DFT of using fft for vector X. I am a MATLAB user, so, I run fft(X,n) when length(X)=16 and n=32. But it doesn’t work since fft in FFTW Pkg is limited to the length of vector X. Is there a way to get a vector with greater length by using fft?

See this related discussion: How to set the length of fft

1 Like

Just pad X with zeros to get to length n.

1 Like

Thanks!

Yes, it works:)