讨论求解微分方程的功率谱
讨论求解微分方程组的功率谱这是我用Welch法编的功率谱图,和文献上的出入很大,不知问题出在哪里,请各位大虾帮帮忙哦,嗬嗬嗬嗬function ydot=liangfun(t,y,flag,a,b,c,d)
ydot=[a*(y(2)-y(1))+y(2)*y(3)*y(4);b*(y(1)+y(2))-y(1)*y(3)*y(4);
-c*y(3)+6*y(2)+y(1)*y(2)*y(4);-d*y(4)+y(1)*y(2)*y(3)];
clear;
Fs=160; %采样频率
a=50;
b=4.3;
c=13;
d=20;
w0=1.2;
nfft=1024;
T=2*pi/w0;
=ode45('liangfun',,,[],a,b,c,d);
xn=y(:,1)';
window=boxcar(100); %矩形窗
window1=hamming(100); %海明窗
window2=blackman(100); %blackman窗
noverlap=20; %数据无重叠
range='half'; %频率间隔为,只计算一半的频率
=pwelch(xn,window,noverlap,nfft,Fs,range);
=pwelch(xn,window1,noverlap,nfft,Fs,range);
=pwelch(xn,window2,noverlap,nfft,Fs,range);
plot_Pxx=10*log10(Pxx);
plot_Pxx1=10*log10(Pxx1);
plot_Pxx2=10*log10(Pxx2);
figure(1)
plot(f,plot_Pxx);
pause;
figure(2)
plot(f,plot_Pxx1);
pause;
figure(3)
plot(f,plot_Pxx2); 用PSD得到的与你这个差异在哪里?我对这个不懂 这个应属於"信号处理方法"
页:
[1]