Q1.28 编写一个MATLAB程序,以产生并显示五个长度为31的随机信号。
{X[n]}={A错误!未找到引用源。}
其中振幅A和相位Φ是统计独立的随机变量,振幅在区间0错误!未找到引用源。相位区间在0错误!未找到引用源。内均匀分布。 答:程序:clear,clc
n=0:31; B=0; A=0; f=100
A=4.*rand(1,length(n));
B=2.*pi*rand(1,length(n)); x=A.*cos(2*pi*f.*n+B); subplot(5,1,1) plot(n,x)
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,2) plot(n,x)
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,3) plot(n,x)
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,4) plot(n,x)
搜索“diyifanwen.net”或“第一范文网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,第一范文网,提供最新高等教育数字信号处理实验报告2(10)全文阅读和word下载服务。
相关推荐: