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

📄 exp4.m

📁 平稳信号的模拟与特征估计 随机信号课程实验
💻 M
字号:
a1=0.1;
N1=500;
sigma1=1;
u1=randn(N1,1);
x(1)=sigma1*u1(1)/sqrt(1-a1^2);
for i=2:N1
    x(i)=a1*x(i-1)+sigma1*u1(i);
end
figure;
subplot(1,2,1)
plot(x)
title('stochastic signal with less auto-correlation');
r1=xcorr(x)/15000;
f1=fft(r1);
fx=(0:length(f1)-1)*1000/length(f1);
subplot(1,2,2)
plot(fx,10*log10(abs(f1)));
title('power-spectrum');


a1=0.8;
N1=500;
sigma1=1;
u1=randn(N1,1);
x(1)=sigma1*u1(1)/sqrt(1-a1^2);
for i=2:N1
    x(i)=a1*x(i-1)+sigma1*u1(i);
end
figure;
subplot(1,2,1)
plot(x)
title('stochastic signal with great auto-correlation');
r1=xcorr(x)/15000;
f1=fft(r1);
fx=(0:length(f1)-1)*1000/length(f1);
subplot(1,2,2)
plot(fx,10*log10(abs(f1)));
title('power-spectrum');

⌨️ 快捷键说明

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