www.gusucode.com > dsp 案例源码程序 matlab代码 > dsp/EstimatePSDUsingTheBurgMethodExample.m

    %% Estimate PSD Using the Burg Method.
%%
% *Note*: This example runs only in R2016b or later. If you are using an
% earlier release, replace each call to the function with the equivalent
% |step| syntax. For example, myObject(x) becomes step(myObject,x).

%%
x = randn(100,1);
h = dsp.BurgSpectrumEstimator('EstimationOrder', 4);
y = filter(1,[1 1/2 1/3 1/4 1/5],x); % Fourth order AR filter
p = h(y); % Uses default FFT length of 256

plot([0:255]/256, p);
title('Burg Method Spectral Density Estimate');
xlabel('Normalized frequency'); ylabel('Power/frequency');