📄 exp2.m.svn-base
字号:
Fs=256;
n=0:1/Fs:1;
x=sin(2*pi*0.05*n)+2*cos(2*pi*0.12*n)+randn(size(n));
figure;
subplot(1,2,1);
R=xcorr(x);
plot(R);
title('256 auto-correlation');
window=rectwin(length(x));
nfft=256;
[Pxx,f]=periodogram(x,window,nfft,Fs);
subplot(1,2,2);
plot(f,10*log10(Pxx));
title('256 power-spectrum');
Fs=1024;
n=0:1/Fs:1;
x=sin(2*pi*0.05*n)+2*cos(2*pi*0.12*n)+randn(size(n));
figure;
subplot(1,2,1);
R=xcorr(x);
plot(R);
title('1024 auto-correlation');
window=rectwin(length(x));
nfft=1024;
[Pxx,f]=periodogram(x,window,nfft,Fs);
subplot(1,2,2);
plot(f,10*log10(Pxx));
title('1024 power-spectrum');
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -