?? ex1_4.m
字號(hào):
% 1-4
%Q1.26
x1=-2+4*rand(1,100);n1=-50:49;
figure(1)
subplot(211),stem(n1,x1),title('長(zhǎng)為100 在[-2,2]中均勻分布的隨機(jī)信號(hào)')
% Q1.27
x2=sqrt(3)*randn(1,75); % x2=0.5+sqrt(3)*rand(1,75) 均值為0.5 標(biāo)準(zhǔn)偏差為3的正態(tài)分布信號(hào)
n2=-37:37;
subplot(212),stem(n2,x2),title('長(zhǎng)為75 均值為0 方差為3的髙斯隨機(jī)信號(hào)')
% 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個(gè)長(zhǎng)度為31的隨機(jī)正弦序列')
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,:))
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -