?? ls1.m
字號:
clear,close all;
N=400;
M=2;
period=[0:N-1];
x=sin(2*pi*0.02*period);
period1=[0,0:N-2];
x1=sin(2*pi*0.02*period1);
xs=0.4*x+0.4*x1;
figure;
subplot(2,1,1);
plot(xs);
grid;
title('standard singal');
noise=0.05*randn(1,N);
y=0.4*x+0.4*x1+noise;
subplot(2,1,2);
plot(y);
grid;
title('standard singal with noise ave=0.5 var=0.05');
[R,d]=lsmatvec('full',x',M,y');
cls=R\d;
Y=filter(1,cls,y);
figure;
plot(0:N-1,Y,'.',0:N-1,y,'k');
grid;
title('The predict singal vs the disired response--post');
legend('Predict singal','Desired response');
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -