anns.m

来自「这里的7个源代码都是关于自适应噪声滤除技术的」· M 代码 · 共 23 行

M
23
字号
>>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 + =
减小字号Ctrl + -
显示快捷键?