Compute FFT consecutively in Matlab
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I have an array of numbers in variable "filter". I wanted to compute Fourier Transform (fft) on every 32 data consecutively using matlab. But the codes below doesn't seems to work. Anyone have a better solution?
for aa=1:length(filter)-32 %scans every row of numbers
output(aa) = fft(filter(aa + (0:31))); % compute fft every 32 data continuously
end
0 Kommentare
Antworten (2)
Youssef Khmou
am 18 Mär. 2014
hi, First remark is the name of the variable "filter" is built-in function, this will lead to ambiguity, the other problem is you are iterating with a step of 32 points but you expect to store 32 points in 1 element, the partition in the right must be the same in the left :
for aa=1:length(X)-32 %scans every row of numbers
output(aa+(0:31)) = fft(X(aa + (0:31)));
end
output is complex vector.
0 Kommentare
Greg Heath
am 18 Mär. 2014
output(aa) is a scalar
output(aa,:) is a row vector
Hope this helps.
Thank you for formally accepting my answer
Greg
1 Kommentar
Siehe auch
Kategorien
Mehr zu Time-Frequency Analysis finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!