How to calculate the FFT on 320e3 points?

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.

 Akzeptierte Antwort

Wayne King
Wayne King am 6 Mär. 2013
Bearbeitet: Wayne King am 6 Mär. 2013

1 Stimme

I do not find that to be the case, have you tested that?
N = 320e3;
x = randn(N,1);
y = zeros(100,1);
for nn = 1:100
tic;
xdft = fft(x);
y(nn) = toc;
end
mean(y), std(y)
Now replace N with N = 100 and repeat. I find the mean time to be a couple orders of magnitude different.

Weitere Antworten (2)

Wayne King
Wayne King am 6 Mär. 2013
Bearbeitet: Wayne King am 6 Mär. 2013

0 Stimmen

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 Kommentar

Giorgio
Giorgio am 6 Mär. 2013
I have a suspect, because if I work with a vector of 100 or 320e3 elements, the time of computation is always the same.

Melden Sie sich an, um zu kommentieren.

Youssef  Khmou
Youssef Khmou am 6 Mär. 2013

0 Stimmen

hi, Giorgio
All you need to know is the Sampling rate Fs .

Produkte

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by