44100Hzの音声データをFFT関数を使ったのですが、
データの中身が虚数部と実数部に分かれておりグラフ化をしてもうまくいかないです。
①FFTの結果が虚数と実数部に分かれる理由、また何を意味について
②結果をHzとdbのきれいなグラフにする方法
基礎的な内容で申し訳ございませんが、ご教授いただきたいと存じます。

 채택된 답변

Hernia Baby
Hernia Baby 2022년 12월 12일

1 개 추천

①フーリエ変換の結果が複素数である理由は位相の成分が隠れているからです。
 周波数空間への変換といいつつ位相のズレ量がないと逆変換できません。
 複素数の実部と虚部は絶対値と位相として見なすことができます。
 として絶対値はで位相はとなります。
 絶対値と位相を各周波数であらわさず、ベクトルとしてコンパクトに書けるのが利点です。
②先にいった通り絶対値に直してやれば大丈夫です。
 手前ミソですが自分の記事を引用します。
適当な信号を作ります。
dt = 0.01;
L = 512;
t = 0:dt:dt*(L-1);
Fs = 1/dt; %サンプリング周波数
y = .5*sin(2*pi*10*t) + 2*sin(2*pi*30*t);
plot(t,y)
xlim([0 t(end)])
xlabel '時間[sec]'
ylabel '信号'
片側スペクトルをデシベルで計算します。
f = Fs*(0:(L/2))/L;
f = f(1:end-1);
cy = fft(y);
P = abs(cy(1:ceil(length(cy)/2)))./(length(y)/2);
plot(f,10*log10(P.^2))
hold on
xlabel '周波数[Hz]'
ylabel '20log_{10}P_1(f)'

댓글 수: 1

一秀 近藤
一秀 近藤 2022년 12월 12일
丁寧なご回答ありがとうございます。とても分かりやすく参考になりました。

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

추가 답변 (1개)

Frantz Bouchereau
Frantz Bouchereau 2026년 11월 9일 19:51

0 개 추천

See this documentation page "Practical introduction to frequency-domain analysis" to understand why the FFT is complex and what does that mean. You will also see examples on how to interpret and plot the FFT data.

카테고리

도움말 센터 및 File Exchange에서 フーリエ解析とフィルター処理에 대해 자세히 알아보기

질문:

2022년 12월 7일

답변:

2026년 11월 9일 19:51

Community Treasure Hunt

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

Start Hunting!