⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ex1_4.m

📁 数字信号处理 实验 的matlab 源码
💻 M
字号:
% 1-4
%Q1.26
x1=-2+4*rand(1,100);n1=-50:49;
figure(1)
subplot(211),stem(n1,x1),title('长为100 在[-2,2]中均匀分布的随机信号')

% Q1.27
x2=sqrt(3)*randn(1,75); % x2=0.5+sqrt(3)*rand(1,75) 均值为0.5 标准偏差为3的正态分布信号
n2=-37:37;
subplot(212),stem(n2,x2),title('长为75 均值为0 方差为3的髙斯随机信号')

% Q1.28
A=4*rand(5,31);phase=2*pi*rand(5,31);
w0=2*pi;n=-15:15;n=[n;n;n;n;n];
xn=A.*cos(w0*n+phase);
figure(2)
subplot(511),stem(n(1,:),xn(1,:)),title('5个长度为31的随机正弦序列')
subplot(512),stem(n(2,:),xn(2,:))
subplot(513),stem(n(3,:),xn(3,:))
subplot(514),stem(n(4,:),xn(4,:))
subplot(515),stem(n(5,:),xn(5,:))

⌨️ 快捷键说明

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