tmp612.m
来自「信号分析与处理的一些源代码」· M 代码 · 共 28 行
M
28 行
%MATLAB PROGRAM 6-12
clf
%Estimate PSD by MUSIC Method
%=========================================
N=1024;
Nfft=256;
Fs=1000;
n=0:N-1;
t=n/Fs;
randn('state',0)
xn=sin(2*pi*50*t)+2*sin(2*pi*120*t)+randn(1,N);
subplot(211)
pmusic(xn,[7,1.1],Nfft,Fs,32,16);
%Estimate PSD by Welch'method
%============================
N=1024;
Nfft=256;
Fs=1000;
n=0:N-1;
t=n/Fs;
randn('state',0)
xn=sin(2*pi*50*t)+2*sin(2*pi*120*t)+randn(1,N);
window=hanning(256);
noverlap=128;
dflag='none';
subplot(212)
psd(xn,Nfft,Fs,window,noverlap,dflag);
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?