How to calculate the FFT on 320e3 points?
Show older comments
Hello,
I am working on a project where I need to calculate the FFT of a Signal.
This signal is one period of a sinusoid, sampled on 64 points. Every 100 periods the phase of the sinusoid change by a random angle (+- pi/2 or -+ pi) and this for 50 times. So, at the end of simulation (Simulink), the result is one dimensional Array of 1 X 64*100*50 = 320e3 points . I need to calculate the FFT, so I am trying to import the Array in Matlab.
But, I have the suspect that Matlab does an approximation or a decimation of the orginal signal. By default, the FFT is fixed on 1024 points?
So, how I can force Matlab to calculate the FFT EXACTLY on 320e3 points ? Maybe this take one hour or more, but I don't care.
Thanks in Advance.
Giorgio.
Accepted Answer
More Answers (2)
Wayne King
on 6 Mar 2013
Edited: Wayne King
on 6 Mar 2013
x = randn(320e3,1);
xdft = fft(x);
Why do you think that MATLAB does not calculate the DFT on the length of the input vector? MATLAB does by default return the N-point DFT of a N-point vector
Youssef Khmou
on 6 Mar 2013
0 votes
hi, Giorgio
The computation wont take that long, try mu submission: http://www.mathworks.com/matlabcentral/fileexchange/40002-psd-power-spectral-density-and-amplitude-spectrum-with-adjusted-fft
All you need to know is the Sampling rate Fs .
Categories
Find more on Transforms in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!