필터 지우기
필터 지우기

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

조회 수: 10 (최근 30일)
Nina
Nina 2013년 2월 21일
댓글: Surendra Maharjan 2019년 4월 3일
Hi, Does FFT always require 2^n? why is that? Thank you.

채택된 답변

Azzi Abdelmalek
Azzi Abdelmalek 2013년 2월 21일
편집: Azzi Abdelmalek 2013년 2월 21일
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
Nina
Nina 2013년 2월 22일
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...
Surendra Maharjan
Surendra Maharjan 2019년 4월 3일
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.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Fourier Analysis and Filtering에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by