090696325
2011-05-23, 17:33
%加载第1组数据
load hg30_0.txt;
s1=hg30_0;
%利用小波函数db2对第1组数据进行一维连续小波变换
c1 = cwt(s1,1:20,'db2');
%加载第2组数据
load lg30a_3.txt;
s2=lg30a_3;
%利用小波函数db2对第2组数据进行一维连续小波变换
c2 = cwt(s2,1:20,'db2');
%加载第3组数据
load lg31b_2.txt;
s3=lg31b_2;
%利用小波函数db2对第3组数据进行一维连续小波变换
c3 = cwt(s3,1:20,'db2');
%加载第4组数据
load lg31c_0.txt;
s4=lg31c_0;
%利用小波函数db2对第4组数据进行一维连续小波变换
c4 = cwt(s4,1:20,'db2');
t = 1:1024;
a = 1:20;
v = 320:20:500;
figure(1);
subplot(411);
plot(t,s1);
axis([0,1024,-500,500]);
subplot(412);
plot(t,s2);
axis([0,1024,-500,500]);
subplot(413);
plot(t,s3);
axis([0,1024,-500,500]);
subplot(414);
plot(t,s4);
axis([0,1024,-500,500]);
figure(2);
subplot(2,2,1);
C1 = contour(t,a,c1);
clabel(C1,v);
subplot(2,2,2);
C2 = contour(t,a,c2);
clabel(C2,v);
subplot(2,2,3);
C3 = contour(t,a,c3);
clabel(C3,v);
subplot(2,2,4);
C4 = contour(t,a,c4);
clabel(C4,v);
结果显示的是
Error in ==> Untitled at 26
plot(t,s1);
load hg30_0.txt;
s1=hg30_0;
%利用小波函数db2对第1组数据进行一维连续小波变换
c1 = cwt(s1,1:20,'db2');
%加载第2组数据
load lg30a_3.txt;
s2=lg30a_3;
%利用小波函数db2对第2组数据进行一维连续小波变换
c2 = cwt(s2,1:20,'db2');
%加载第3组数据
load lg31b_2.txt;
s3=lg31b_2;
%利用小波函数db2对第3组数据进行一维连续小波变换
c3 = cwt(s3,1:20,'db2');
%加载第4组数据
load lg31c_0.txt;
s4=lg31c_0;
%利用小波函数db2对第4组数据进行一维连续小波变换
c4 = cwt(s4,1:20,'db2');
t = 1:1024;
a = 1:20;
v = 320:20:500;
figure(1);
subplot(411);
plot(t,s1);
axis([0,1024,-500,500]);
subplot(412);
plot(t,s2);
axis([0,1024,-500,500]);
subplot(413);
plot(t,s3);
axis([0,1024,-500,500]);
subplot(414);
plot(t,s4);
axis([0,1024,-500,500]);
figure(2);
subplot(2,2,1);
C1 = contour(t,a,c1);
clabel(C1,v);
subplot(2,2,2);
C2 = contour(t,a,c2);
clabel(C2,v);
subplot(2,2,3);
C3 = contour(t,a,c3);
clabel(C3,v);
subplot(2,2,4);
C4 = contour(t,a,c4);
clabel(C4,v);
结果显示的是
Error in ==> Untitled at 26
plot(t,s1);