24小时热门版块排行榜    

查看: 404  |  回复: 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 的主题更新
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[考研] 279求调剂 +5 红衣隐官 2026-03-21 5/250 2026-03-21 14:59 by lature00
[考研] 330求调剂0854 +3 assdll 2026-03-21 3/150 2026-03-21 13:01 by 搏击518
[考研] 313求调剂 +3 肆叁贰壹22 2026-03-19 3/150 2026-03-21 08:01 by JourneyLucky
[考研] 316求调剂 +6 梁茜雯 2026-03-19 6/300 2026-03-21 06:32 by Ecowxq666!
[考研] 310求调剂 +3 baibai1314 2026-03-16 3/150 2026-03-21 03:56 by JourneyLucky
[考研] 299求调剂 +6 △小透明* 2026-03-17 6/300 2026-03-21 02:42 by JourneyLucky
[考研] 083200学硕321分一志愿暨南大学求调剂 +3 innocenceF 2026-03-17 3/150 2026-03-21 02:35 by JourneyLucky
[考研] 一志愿 西北大学 ,070300化学学硕,总分287,双非一本,求调剂。 +3 晨昏线与星海 2026-03-18 3/150 2026-03-21 00:46 by JourneyLucky
[考研] 304求调剂 +7 司空. 2026-03-18 7/350 2026-03-20 23:08 by JourneyLucky
[考研] 一志愿 西北大学 ,070300化学学硕,总分287,双非一本,求调剂。 +4 晨昏线与星海 2026-03-19 4/200 2026-03-20 22:15 by JourneyLucky
[考研] 求调剂,一志愿:南京航空航天大学大学 ,080500材料科学与工程学硕,总分289分 +4 @taotao 2026-03-19 4/200 2026-03-20 22:14 by JourneyLucky
[基金申请] 学校已经提交到NSFC,还能修改吗? 40+4 babangida 2026-03-19 8/400 2026-03-20 15:58 by babero
[考研] 281求调剂(0805) +14 烟汐忆海 2026-03-16 25/1250 2026-03-20 15:47 by yuncha
[考博] 招收博士1-2人 +3 QGZDSYS 2026-03-18 3/150 2026-03-20 11:58 by 呱呱呱呱叫
[考研] 求调剂 +3 暗涌afhb 2026-03-16 3/150 2026-03-20 00:28 by 河南大学校友
[论文投稿] 申请回稿延期一个月,编辑同意了。但系统上的时间没变,给编辑又写邮件了,没回复 10+3 wangf9518 2026-03-17 4/200 2026-03-19 23:55 by babero
[考研] 288求调剂,一志愿华南理工大学071005 +5 ioodiiij 2026-03-17 5/250 2026-03-19 18:22 by zcl123
[考研] 266求调剂 +5 阳阳哇塞 2026-03-14 10/500 2026-03-19 15:08 by 阳阳哇塞
[考研] 308求调剂 +4 是Lupa啊 2026-03-16 4/200 2026-03-17 17:12 by ruiyingmiao
[论文投稿] 有没有大佬发小论文能带我个二作 +3 增锐漏人 2026-03-17 4/200 2026-03-17 09:26 by xs74101122
信息提示
请填处理意见