📄 anns.m
字号:
>>clear all
>> time=0.01:0.01:10;
>> noise=(rand(1,1000)-0.5)*4;
>> input=sin(time);
>> p=noise;
>> t=input+noise;
>> net=newlin([-1 1],1,0,0.0005);
>> net.adaptParam.passes=70;
>> [net,y,output]=adapt(net,p,t);
>>hold on
>> subplot(3,1,1);
>> plot(time,input,'b');
>> xlabel('t','position',[10.5,-1]);
>> ylabel('信号波形sin(t)','fontsize',8);
>> subplot(3,1,2);
>> plot(time,t,'m');
>> xlabel('t','position',[10.5,-5]);
>> ylabel('随机信号波形sin(t)+noise(t)','fontsize',8)
>> subplot(3,1,3);
>> plot(time,output,'y');
>> xlabel('t','position',[10.5,-2]);
>> ylabel('输出信号波形y(t)','fontsize',8)
>> hold off
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -