声振论坛

 找回密码
 我要加入

QQ登录

只需一步,快速开始

查看: 1178|回复: 2

[HHT] 求高手帮助解释程序!

[复制链接]
发表于 2011-9-14 19:07 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?我要加入

x
clc;
clear all;
t=linspace(0.15,1.15);
d=4*sin(20*pi*t).*sin(pi*2*t/10)+sin(10*pi*t);
a(1:100)=d;
a=a';
n=a(1:100,1);
b=flipud(n);
for k=1:96;
    m(k,1:5)=b([k k+1 k+2 k+3 k+4]);
end
T=m(2:96,5);
p_test=m(96,1:5);
m(96,:)=[];
p=m(:,1:5);
p=p';
T=T';
net=newff(minmax(p),[11,1],{'tansig','purelin'},'trainlm'
);
net.trainParam.epochs=1000;
net.trainParam.goal=1e-8;
net.trainParam.show=5;
net.trainParam.lr=0.1;
net=train(net,p,T);
c(1)=p_test(1,1);c(2)=p_test(1,2);c(3)=p_test(1,3);c(4)=p
_test(1,4);c(5)=p_test(1,5);
j=1;
for i=1:10;
y(i,:)=[c(j) c(j+1) c(j+2) c(j+3) c(j+4)];
    x(:,i)=y(i,:)';
    c(j+5)=sim(net,x(:,i));
    j=j+1;
end
disp(c);
T(91:105)=c;
t1=fliplr(T);
t0=(0.06:0.01:1.10);
plot(t0,t1,'*r');
hold on;
ezplot('4*sin(20*pi*t).*sin(pi*2*t/10)+sin(10*pi*t)',[0.0
6,1.10]);
hold off;
xlabel('时间(time)t/s');
ylabel('幅值/mm');
legend('预测振动曲线(*)与实际测试曲线(蓝)比较');
print(gcf,'-dpng','d:\5.png');
只需解释当中那段啊。求帮忙!
回复
分享到:

使用道具 举报

 楼主| 发表于 2011-9-25 16:21 | 显示全部楼层
回复 1 # 李清志 的帖子

怎么没人帮忙啊?我是新人啊。求助
发表于 2011-9-26 09:17 | 显示全部楼层
中间那段是神经网络部分么?别人的程序?
您需要登录后才可以回帖 登录 | 我要加入

本版积分规则

QQ|小黑屋|Archiver|手机版|联系我们|声振论坛

GMT+8, 2024-9-21 16:24 , Processed in 0.060333 second(s), 17 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表