?? sinf1.m
字號:
%給定并顯示一個正弦信號
t=0:1000;
s=sin(0.05*t);
subplot(3,1,1);
plot(s);
axis([0 1000 -1 1]);
title('原始信號');
%===============================
%給信號加噪并顯示
ns=s+randn(1,length(t));
subplot(3,1,2);
plot(ns);
axis([0 1000 -1 1]);
title('加噪信號');
%=================================
%對信號進行消噪并顯示
xd=wden(ns,'minimaxi','s','one',5,'db3');
subplot(3,1,3);
plot(xd);
axis([0 1000 -1 1]);
title('消噪信號');
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -