Fs = 44100; %音频信号采样率
dt = 1.0/Fs; %采样周期
T = 4;   %声音播放长度为4秒
N = T/dt;   %采样点数
t = [0:N-1]*dt;  %时间向量
x = 0.3*sin(2*pi*300*t); %300Hz音频信号

subplot(2,2,1)
plot(t,x);    %画图
axis([0,0.01,-0.5,0.5]); %调整数轴
p1=audioplayer(x,Fs); %声音播放
play(p1)

pause(5)
y1 = 0.1*randn(1,length(t)); %高斯白噪声生成
subplot(2,2,2)
plot(t,y1);
axis([0,0.01,-0.5,0.5]);
p2=audioplayer(y1,Fs);
play(p2)

subplot(2,2,3)
hist(y1,100);

y2=x + y1;
subplot(2,2,4)
plot(t,y2);
axis([0,0.01,-0.5,0.5]);
p4=audioplayer(y2,Fs);
play(p4)

数字通信——加性噪声小实验

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-13
猜你喜欢
  • 2022-02-18
  • 2021-09-30
  • 2021-07-22
  • 2022-12-23
  • 2021-04-03
  • 2021-04-23
  • 2021-11-30
相关资源
相似解决方案