How to calculate the FFT on 320e3 points?
Mostrar comentarios más antiguos
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.
Respuesta aceptada
Más respuestas (2)
Wayne King
el 6 de Mzo. de 2013
Editada: Wayne King
el 6 de Mzo. de 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
1 comentario
Giorgio
el 6 de Mzo. de 2013
Youssef Khmou
el 6 de Mzo. de 2013
0 votos
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 .
Categorías
Más información sobre Transforms en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!