example_awgn.m

来自「经典《信号与系统》教程的matlab例程,对深入理解信号与系统相关概念有很大帮助」· M 代码 · 共 16 行

M
16
字号
% Name:example_awgn.m
% Additive white Gaussian noise
close all,clear,
t=0:0.01:10;
x=sin(pi*t);
y=awgn(x,5);
subplot(211)
plot(t,x)
title('The original signal x(t)')
axis([0,10,-2,2])
subplot(212)
plot(t,y)
title('The output signal y(t)')
xlabel('Time t')
axis([0,10,-2,2])

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?