问题:如何正确使用[pxx,f] =周期图(y_soundsource_data,window,nfft,Fs);?
对于上下文...试图获得PSD局部最大值,对于3个特定频率范围。我想要x频率值和PSD-y值。
(这是我昨天的审判,这是非常错误的---> https://dsp.stackexchange.com/questions/56468/normalizing-vectors-to-be-the-same-size-to-retain-psd-data)
我发了一封电子邮件给某人,他说要使用周期图调用的[pxx,f] =周期图(_Fs)版本。
其中pxx = PSD y值向量,f = x值,对应于与pxx点1:1匹配的频率值
不受欢迎的行为:
码
%% audioread .wav file
[y Fs]= audioread('100-daddy1.wav');
%% y=source signal
sourceFig=figure(1);
plot(y);
xlabel('milliseconds'); ylabel('amplitude'); title('spectrogram = voice source signal');
%% PSD - Power Spectral Density <-- peaks here should give formants
filterfcn=figure(2);
PSD=periodogram(y); %calculate the power spectral density of the source signal
plot(PSD);
ylabel('magnitude || intensity of signal'); xlabel('frequency in Hz'); title('PSD of Source');
xlim([0, .35*10^4]);
%% [pxx,f] = periodogram(_,fs)
%fs is the fourth input to periodogram
% to use default values, do [], for preceding args
[pxx4, f]= periodogram( [], Fs);
disp(sizeof(pxx4));
disp(sizeof(f));
我如何正确使用[pxx,f] =周期图(y_soundsource_data,window,nfft,Fs);
我需要pxx和f向量能够索引以找到最大值。
窗口绘图仪出现的原因是因为你使用了窗口方式函数作为调用的输入参数:[pxx,f] =周期图(y_soundsource_data,window,nfft,Fs)。
解构[pxx,f] =周期图(y_soundsource_data,window,nfft,Fs);
file[y Fs]= audioread('100-daddy1.wav');