24小时热门版块排行榜    

查看: 405  |  回复: 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 的主题更新
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[考研] 296求调剂 +4 www_q 2026-03-20 4/200 2026-03-21 17:26 by 学员8dgXkO
[考研] 333求调剂 +4 87639 2026-03-21 4/200 2026-03-21 17:18 by 学员8dgXkO
[考研] 化学调剂 +3 yzysaa 2026-03-21 3/150 2026-03-21 16:40 by macy2011
[考研] 299求调剂 +4 某某某某位 2026-03-21 4/200 2026-03-21 16:30 by barlinike
[考研] 22 350 本科985求调剂,求老登收留 +3 李轶男003 2026-03-20 3/150 2026-03-21 13:28 by 搏击518
[考研] 307求调剂 +3 wyyyqx 2026-03-17 3/150 2026-03-21 03:20 by JourneyLucky
[考研] 301求调剂 +10 yy要上岸呀 2026-03-17 10/500 2026-03-21 03:14 by JourneyLucky
[考研] 265求调剂 +9 梁梁校校 2026-03-17 9/450 2026-03-21 02:17 by JourneyLucky
[考研] 一志愿华中科技大学,080502,354分求调剂 +5 守候夕阳CF 2026-03-18 5/250 2026-03-21 01:06 by JourneyLucky
[考研] 274求调剂 +10 S.H1 2026-03-18 10/500 2026-03-20 23:51 by JourneyLucky
[考研] 一志愿南京理工大学085701资源与环境302分求调剂 +4 葵梓卫队 2026-03-18 6/300 2026-03-20 23:02 by JourneyLucky
[考研] 药学383 求调剂 +3 药学chy 2026-03-15 5/250 2026-03-20 22:11 by 云游重阳
[考研] 353求调剂 +3 拉钩不许变 2026-03-20 3/150 2026-03-20 19:56 by JourneyLucky
[考博] 申博26年 +3 八6八68 2026-03-19 3/150 2026-03-19 19:43 by nxgogo
[考研] 085600材料与化工调剂 324分 +10 llllkkkhh 2026-03-18 12/600 2026-03-19 14:33 by llllkkkhh
[考研] 0854可跨调剂,一作一项核心论文五项专利,省、国级证书40+数一英一287 +8 小李0854 2026-03-16 8/400 2026-03-18 14:35 by 搏击518
[考研] 有没有道铁/土木的想调剂南林,给自己招师弟中~ +3 TqlXswl 2026-03-16 7/350 2026-03-17 15:23 by TqlXswl
[考研] 材料工程专硕274一志愿211求调剂 +6 薛云鹏 2026-03-15 6/300 2026-03-17 11:05 by 学员h26Tkc
[考研] 302求调剂 +4 小贾同学123 2026-03-15 8/400 2026-03-17 10:33 by 小贾同学123
[考研] 机械专硕325,寻找调剂院校 +3 y9999 2026-03-15 5/250 2026-03-16 19:58 by y9999
信息提示
请填处理意见