フィルターのクリア

Mistake in fft() help (calculation of single-sided spectrum)?

9 ビュー (過去 30 日間)
Steradiant
Steradiant 2019 年 10 月 11 日
回答済み: Samatha Aleti 2019 年 10 月 18 日
In the fft() help, a single sided spectrum is calculated as follows:
Y = fft(X);
P2 = abs(Y/L);
P1 = P2(1:L/2+1);
P1(2:end-1) = 2*P1(2:end-1);
First question: Regarding line 3. Why is the entry L/2+1 also taken into accout for the single sided spectrum? Shouldn't this value be part of the other side of the spectrum?
Second question: Regarding line 4. Why is the last entry not multiplied by 2 (the end value of the entry is end-1 instead of end)?

回答 (1 件)

Samatha Aleti
Samatha Aleti 2019 年 10 月 18 日

カテゴリ

Help Center および File ExchangeFourier Analysis and Filtering についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by