axis([0 31 -4 4]); grid;
title('随机正弦信号四');xlabel('n');ylabel('幅值A');
A=4.*rand(1,length(n));
B=2.*pi*rand(1,length(n)); x=A.*cos(2*pi*f.*n+B); subplot(5,1,5) plot(n,x)
axis([0 31 -4 4]); grid;
title('随机正弦信号五');xlabel('n');ylabel('幅值A');
所得图像如下所示:
五、试验总结:通过本次试验初步认识了MATLAB软件,并使用其产生信号和绘制信号的基本命令,更加深刻的理解了数字信号的产生及其概念。

