24小时热门版块排行榜    

查看: 407  |  回复: 3

shuishui1988

铜虫 (小有名气)

[求助] Matlab 程序求助

本人初学Matlab,最近在研究小波变换,下面的程序得到的小波变换的波形非常不好,不知道问题出在哪里,希望高手解答,金币奉上~
clear;
close all;
clc

m=10^(-17);  
k=10;      
E0=1*1.60217646*10^(-19);
%r=2*sqrt(k*m);
r=10^(-3);%6.32*10^(-4);
beta=30*pi/180;
vm=400;
ax=4;
ay=7;
jiange=0.002;
tend=75;
x0=[0 0];
[t x]=ode45(@ode1DMoS2,[0:jiange:tend],x0,[],m,k,E0,r,vm,ax,ay,jiange,beta);
xx=x(:,1);
vx=x(:,2);
counter=1;
for i=1:length(xx)

          b(counter)=xx(i);
          f(1,counter)=k*(vm*t(i)*jiange-b(counter))*0.1;
          f(2,counter)=vm*t(i)*jiange*0.1;
          counter=counter+1;
end
figure;
plot(f(2,,f(1,);
figure;
[c,l]=wavedec(f(1,,5,'db9');
a4=wrcoef('a',c,l,'db9',5);
a3=wrcoef('d',c,l,'db9',4);
a2=wrcoef('d',c,l,'db9',3);
a1=wrcoef('d',c,l,'db9',2);
d1=wrcoef('d',c,l,'db9',1);
figure(2);
subplot(5,1,1);
plot(a4,'k-','LineWidth',2);
ylabel('a4');
subplot(5,1,2);
plot(a3,'k-','LineWidth',2);
ylabel('a3');
subplot(5,1,3);
plot(a2,'k-','LineWidth',2);
ylabel('2');
subplot(5,1,4);
plot(a1,'k-','LineWidth',2);
ylabel('a1');
subplot(5,1,5);
plot(d1,'k-','LineWidth',2);
ylabel('d1');
xlabel('时间 t/s');
subplot(6,1,1);plot(f(1,);

Matlab 程序求助
小波变换.jpg
回复此楼

» 猜你喜欢

» 本主题相关价值贴推荐,对您同样有帮助:

已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

shuishui1988

铜虫 (小有名气)

程序如下:
clear;
close all;
clc

m=10^(-17);  
k=10;      
E0=1*1.60217646*10^(-19);
%r=2*sqrt(k*m);
r=10^(-3);%6.32*10^(-4);
beta=20*pi/180;
vm=400;
ax=5.7;
ay=9.88;
jiange=0.002;
tend=75;
x0=[0 0];
[t x]=ode45(@ode1DMoS2,[0:jiange:tend],x0,[],m,k,E0,r,vm,ax,ay,jiange,beta);
xx=x(:,1);
vx=x(:,2);
counter=1;
for i=1:length(xx)

          b(counter)=xx(i);
          f(1,counter)=k*(vm*t(i)*jiange-b(counter))*0.1;
          f(2,counter)=vm*t(i)*jiange*0.1;
          counter=counter+1;
end
figure;
plot(f(2,,f(1,);
figure;
[c,l]=wavedec(f(1,,5,'db9');
a4=wrcoef('a',c,l,'db9',5);
a3=wrcoef('d',c,l,'db9',4);
a2=wrcoef('d',c,l,'db9',3);
a1=wrcoef('d',c,l,'db9',2);
d1=wrcoef('d',c,l,'db9',1);
figure(2);
subplot(5,1,1);
plot(a4,'k-','LineWidth',2);
ylabel('a4');
subplot(5,1,2);
plot(a3,'k-','LineWidth',2);
ylabel('a3');
subplot(5,1,3);
plot(a2,'k-','LineWidth',2);
ylabel('2');
subplot(5,1,4);
plot(a1,'k-','LineWidth',2);
ylabel('a1');
subplot(5,1,5);
plot(d1,'k-','LineWidth',2);
ylabel('d1');
xlabel('时间 t/s');
subplot(6,1,1);plot(f(1,);
%figure;plot(t,f(1,);
%figure;plot(t,b);
%figure;plot(t,f(2,);
%figure;plot(t);
2楼2015-05-29 14:27:17
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

shuishui1988

铜虫 (小有名气)

笑脸实际是程序“:)”,希望高手帮帮忙啊!
3楼2015-05-29 14:29:09
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

shuishui1988

铜虫 (小有名气)

求助各位,帮帮忙啊~
4楼2015-06-01 09:54:35
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 shuishui1988 的主题更新
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[考研] 材料与化工(0856)304求B区调剂 +3 邱gl 2026-03-20 7/350 2026-03-21 19:05 by 15709483992
[考研] 初试 317 +6 半拉月丙 2026-03-20 6/300 2026-03-21 18:27 by 学员8dgXkO
[考研] 一志愿深大,0703化学,总分302,求调剂 +4 七月-七七 2026-03-21 4/200 2026-03-21 18:20 by 学员8dgXkO
[考研] 求调剂 +3 .m.. 2026-03-21 4/200 2026-03-21 16:25 by barlinike
[考研] 0805材料320求调剂 +3 深海物语 2026-03-20 3/150 2026-03-21 15:46 by 无际的草原
[考研] 一志愿山大07化学 332分 四六级已过 本科山东双非 求调剂! +3 不想理你 2026-03-16 3/150 2026-03-21 03:59 by JourneyLucky
[考研] 070300化学319求调剂 +7 锦鲤0909 2026-03-17 7/350 2026-03-21 03:46 by JourneyLucky
[考研] 083200学硕321分一志愿暨南大学求调剂 +3 innocenceF 2026-03-17 3/150 2026-03-21 02:35 by JourneyLucky
[考研] 一志愿武理材料305分求调剂 +6 想上岸的鲤鱼 2026-03-18 7/350 2026-03-21 01:03 by JourneyLucky
[考研] 一志愿南昌大学,327分,材料与化工085600 +9 Ncdx123456 2026-03-19 9/450 2026-03-20 23:41 by lovewei0727
[考研] 085600材料与化工 +8 安全上岸! 2026-03-16 8/400 2026-03-20 22:13 by luoyongfeng
[考研] 261求B区调剂,科研经历丰富 +3 牛奶很忙 2026-03-20 4/200 2026-03-20 19:34 by JourneyLucky
[考研] 085600材料与化工求调剂 +6 绪幸与子 2026-03-17 6/300 2026-03-19 13:27 by houyaoxu
[考研] 一志愿985,本科211,0817化学工程与技术319求调剂 +10 Liwangman 2026-03-15 10/500 2026-03-19 10:25 by 无际的草原
[考研] 材料工程专硕调剂 +5 204818@lcx 2026-03-17 6/300 2026-03-18 22:55 by 204818@lcx
[考研] 0854可跨调剂,一作一项核心论文五项专利,省、国级证书40+数一英一287 +8 小李0854 2026-03-16 8/400 2026-03-18 14:35 by 搏击518
[考研] 277调剂 +5 自由煎饼果子 2026-03-16 6/300 2026-03-17 19:26 by 李leezz
[考研] 070300化学学硕求调剂 +6 太想进步了0608 2026-03-16 6/300 2026-03-16 16:13 by kykm678
[考研] 0703化学调剂 290分有科研经历,论文在投 +7 腻腻gk 2026-03-14 7/350 2026-03-16 10:12 by houyaoxu
[考研] 0856专硕279求调剂 +5 加油加油!? 2026-03-15 5/250 2026-03-15 11:58 by 2020015
信息提示
请填处理意见