讨论求解微分方程组的功率谱
这是我用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);
[ 本帖最后由 ChaChing 于 2009-9-21 08:30 编辑 ] 标题有问题,没说清楚
页:
[1]