?? program_11_4.m
字號:
% Program 11_4
% Power Spectrum Estimation Using Welch's Method
%
colordef black
n = 0:1000;
g = 2*sin(0.12*pi*n) + sin(0.28*pi*n) + randn(size(n));
nfft = input('Type in the fft size = ');
window = hamming(256);
noverlap =input('Type in the amount of overlap = ');
[Pxx, f] = psd(g,nfft,2,window,noverlap);
axis=zeros(size(f/2));
plot(f/2,10*log10(Pxx),'g',f/2,axis,'r');grid
xlabel('\omega/\pi');ylabel('Power Spectrum, dB');
title(['Overlap = ',num2str(noverlap),' samples']);
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -