Documentation Center

  • Trial Software
  • Product Updates

Autoregressive PSD Object to Function Replacement Syntax

The following table gives the deprecated AR PSD object syntax and the equivalent recommended function syntax. The table uses spectrum.burg and pburg as examples, but the object-to-function replacement syntaxes are valid for all the AR spectral estimators with the appropriate substituion: spectrum.burg to pburg, spectrum.cov to pcov, spectrum.mcov to pmcov, and spectrum.yulear to pyulear. In each example, x is the input time series.

Deprecated Syntax

Replacement Syntax

hBurg = spectrum.burg;
psd(hBurg,x);
pburg(x,4);
hBurg = spectrum.burg(order);
psd(hBurg,x);
pburg(x,order);
hBurg = spectrum.burg(order);
psd(hBurg,x,'NFFT', nfft);
pburg(x,order,nfft);
hBurg = spectrum.burg(order);
psd(hBurg,x,'Fs',fs);
pburg(x,order,[],fs);
hBurg = spectrum.burg(order);
psd(hBurg,x,'NFFT',nfft,'Fs',fs);
pburg(x,order,nfft,fs);
hBurg = spectrum.burg(order);
psd(hBurg, x,...,'FreqPoints','User Defined',......
'FrequencyVector',w);
pburg(x,order,w);
hBurg = spectrum.burg(order);
psd(hBurg,x,'FreqPoints','User Defined',... 
'FrequencyVector',f,'Fs',fs);
pburg(x,order,f,fs);
% when x is real and you want a two-sided spectrum 
hBurg = spectrum.burg
psd(...,'SpectrumType','TwoSided');
% when x is real and you want a two-sided spectrum 
pbug(...,'twosided');
% Two-sided spectrum with DC (0 frequency)in 
% the center
hBurg = spectrum.burg;
psd(...,'CenterDC',true);
% Two-sided spectrum with DC (0 frequency)in 
% the center
pburg(x,...,'centered'); 
hBurg = spectrum.burg;
psd(...,'ConfLevel',p);
pburg(x,...,'ConfidenceLevel',p); 
hBurg = spectrum.burg;
hPSD = psd(...);
Pxx = hPSD.Data;
F = hPSD.Frequencies;
[Pxx, F] = pburg(...); 
hBurg = spectrum.burg;
hPSD = psd(...,'ConfLevel',p);
Pxx = hPSD.Data;
F = hPSD.Frequencies;
Pxxc = hPSD.ConfInterval;
[Pxx,F,Pxxc] = pburg(...); 

Was this topic helpful?