关于用MATLAB设计确定信号的频谱分析和滤波

2025-02-27 21:56:27
推荐回答(2个)
回答1:

如果不非要用MATLAB,虚拟仪器会不会简便一点。

回答2:

1-4以前都给过例子,其实Matlab自带的Help也能拼凑出来,例如说频谱分析:

t = 0:0.001:0.6;
x = sin(2*pi*50*t)+sin(2*pi*120*t);
y = x + 2*randn(size(t));
plot(1000*t(1:50),y(1:50))
title('Signal Corrupted with Zero-Mean Random Noise')
xlabel('time (milliseconds)')

Y = fft(y,512);

Pyy = Y.* conj(Y) / 512;

f = 1000*(0:256)/512;
plot(f,Pyy(1:257))
title('Frequency content of y')
xlabel('frequency (Hz)')