Documentation Center

  • Trial Software
  • Product Updates

Periodogram MSSPECTRUM Object to Function Replacement Syntax

The following table gives the deprecated spectrum.periodogram MSSPECTRUM object syntax and the equivalent recommended function syntax for periodogram. In the modified periodogram, you use a window other than the default rectangular window. To illustrate modified periodogram syntaxes, the table uses a specific window. In each example, x is the input time series.

Deprecated Syntax

Recommended Syntax

h = spectrum.periodogram;
msspectrum(h,x);
periodogram(x,'power');
h = spectrum.periodogram('Hamming');
msspectrum(h,x);
win = hamming(length(x));
periodogram(x,win,'power');
h = spectrum.periodogram({'Hamming','periodic'});
msspectrum(h,x);
win = hamming(length(x),'periodic');
periodogram(x,win,'power');
nbar = 4;
sll = 30;
h = spectrum.periodogram({'Taylor',nbar,sll});
msspectrum(h,x);
nbar = 4;
sll = -30;
win = taylorwin(length(x),nbar,sll);
periodogram(x,win,'power');
h = spectrum.periodogram(...);
msspectrum(h,x,'NFFT',nfft);
win= ...
periodogram(x,window,nfft,'power');
h = spectrum.periodogram(...);
msspectrum(h,x,'Fs',fs);
win = ...
periodogram(x,win,[],fs,'power');
h = spectrum.periodogram(...);
msspectrum(h,x,'NFFT',nfft,'Fs',fs);
win = ...
periodogram(x,win,nfft,fs,'power');
% when x is real and you want a 
% two-sided spectrum
h = spectrum.periodogram(…);
msspectrum(h,x,...,'SpectrumType','TwoSided');
win = ...
periodogram(x,win,..., 'twosided','power');
h = spectrum.periodogram(...);
msspectrum(h, x,...,'CenterDC',true);
win = ...
periodogram(x,win,...,'centered','power'); 
h = spectrum.periodogram(...);
msspectrum(h,x,...,'ConfLevel',p);
win = ...
periodogram(x,win,...,'ConfidenceLevel', p,...'power'); 
h = spectrum.periodogram(...);
hMS = msspectrum(h,x,...);
Sxx = hMS.Data;
F = hMS.Frequencies;
win = ...
[Sxx,F] = periodogram(x,win,...,'power'); 
h = spectrum.periodogram(...);
hMS = msspectrum(h,x,...,'ConfLevel',p);
Sxx = hMS.Data;
F = hMS.Frequencies;
Sxxc = hMS.ConfInterval;
win = ...
[Sxx,F,Sxxc] = periodogram(x,win,...,'power'); 

Was this topic helpful?