📄 xinhao.m
字号:
time=0.5:0.5:20;
y=(rand(1,40)-0.5)*4;
p=con2seq(y);
delays=[1 2];
t=p;
net=newlin(minmax(y),1,delays,0.0005);
net.adaptParam.passes=70;
[net,a,output]=adapt(net,p,t);
hold on
subplot(3,1,1);
plot(time,y,'k*-');
xlabel('t','position',[20.5,-1.8]);
ylabel('随机输入信号s(t)')
axis([0 20 -2 2]);
subplot(3,1,2);
output=seq2con(output);
plot(time,output{1},'ko-');
xlabel('t','position',[20.5,-1.8]);
ylabel('预测输出信号y(t)')
axis([0 20 -2 2]);
subplot(3,1,3);
e=output{1}-y;
plot(time,e,'k-');
xlabel('t','position',[20.5,-1.8]);
ylabel('误差曲线e(t)')
axis([0 20 -2 2]);
hold off
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -