フィルターのクリア

I can't get the Spectrogram to work, could anyone help please, I have attached my code?

4 ビュー (過去 30 日間)
Sarah
Sarah 2015 年 4 月 18 日
回答済み: Cindy Solomon 2015 年 4 月 21 日
Hi, I have recorded audio using the data acquisition toolbox and I am now wanting to analyse my results in the frequency domain with time on the y-axis.
'AvgL' is the averaged signal of the audio from the left speaker and then I have taken the FFT of it multiplied by the FFT of the original driving audio signal.
I then unwrapped the FFT ('HL') to give me the phase delay. But I am unsure how to view it in the spectrogram with the frequency against time?
Fs = 44100;
Ns = 32767; % length of audio signal
f = (0:Ns-1)*(Fs/Ns);
t = ((0:Ns-1)/Fs)*2;
xfft_L = fft(AvgL'); % FFT of the average of the recorded audio signal
dfft = fft(org_mls); % FFT of the original audio signal
HL = xfft_L./dfft; % FFT
Phi = unwrap(angle(HL)); % Phase Response
omega = 2*pi*f;
PD_L = -Phi./omega';
Could any one please help? Really appreciate it :)

回答 (1 件)

Cindy Solomon
Cindy Solomon 2015 年 4 月 21 日
Hi Sarah,
Assuming that you want to see the spectrogram of the signal "AvgL", there is actually already a function to do this in MATLAB without you expressly having to find the FFT, etc. The doc page for this function is here, but typing:
spectrogram(AvgL)
should calculate and display this for you. Hope this helps!

カテゴリ

Help Center および File ExchangeAudio Processing Algorithm Design についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by