Does fft() always require 2^n sample points?

 Akzeptierte Antwort

Azzi Abdelmalek
Azzi Abdelmalek am 21 Feb. 2013
Bearbeitet: Azzi Abdelmalek am 21 Feb. 2013

0 Stimmen

No. any number of samples. Just try it. The algorithm needs 2*n samples to have even samples and odd samples. If you have odd number, you can add a 0 to your samples then use the fft algorithm, at the end you have just to take in account your original samples.

2 Kommentare

Nina
Nina am 22 Feb. 2013
Thank you Azzi, but could you please be kind and clarify what you meant by "at the end you have just to take in account your original samples."? where does that come into play? sorry I am really new to this whole thing so I don't have much background...
Dear Nina,
A = [1 2 3 4 5];
B = [1 2 3 4 5 0 0 0];
For example, A is your row matrix, then you can add three zeros to make A into power multiples of 2. So, B has 8 elements. Then, you can perform C = fft(B,[],2),,[] indicates matrix and 2 indicates the fft direction in row.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Fourier Analysis and Filtering finden Sie in Hilfe-Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by