Documentation Center

  • Trial Software
  • Product Updates

Multitaper PSD Object to Function Replacement Syntax

The following table gives the deprecated spectrum.mtm object syntax and the equivalent recommended function syntax for pmtm. In each example, x is the input time series.

Deprecated Syntax

Recommended Syntax

hMTM = spectrum.mtm;
psd(hMTM,x);
pmtm(x,4);
hMTM = spectrum.mtm(NW);
psd(hMTM,x);
pmtm(x,NW);
[E, V] = dpss(length(x),NW);
hMTM = spectrum.mtm(E,V);
psd(hMTM,x);
[E, V] = dpss(length(x),NW);
pmtm(x,E,V);
hMTM = spectrum.mtm(NW);
psd(hMTM,x,'Fs',fs);
pmtm(x,NW,fs);
hMTM = spectrum.mtm(E,V);
psd(hMTM,x,'Fs',fs);
pmtm(x,E,V,fs);
hMTM = spectrum.mtm(NW);
psd(hMTM,x,'Fs',fs,'NFFT',nfft);
pmtm(x,NW,nfft,fs);
hMTM = spectrum.mtm(E,V);
psd(hMTM,x,'Fs',fs,'NFFT',nfft);
pmtm(x,E,V,nfft,fs);
hMTM = spectrum.mtm(NW);
psd(hMTM,x,'FreqPoints','User Defined',...
'FrequencyVector',w);
pmtm(x,NW,w);
hMTM = spectrum.mtm(E,V);
psd(hMTM,x,'FreqPoints','User Defined',...
'FrequencyVector',w);
pmtm(x,E,V,w);
hMTM = spectrum.mtm(NW);
psd(hMTM,x,'FreqPoints','User Defined',...
'FrequencyVector', f,'Fs',fs);
pmtm(x,E,V,f,fs);
hMTM = spectrum.mtm(E,V);
psd(hMTM,x,'FreqPoints','User Defined',...
'FrequencyVector'',f,'Fs',fs);
pmtm(x,E,V,f,fs);
hMTM = spectrum.mtm(...,'Adaptive');
psd(hMTM,...);
pmtm(...,'adapt');
hMTM = spectrum.mtm(...,'Eigenvalue');
psd(hMTM,...);
pmtm(...,'eigen');
hMTM = spectrum.mtm(...,'Unity');
psd(hMTM,...);
pmtm(...,'unity');
% when x is real and you want a two-sided spectrum 
hMTM = spectrum.mtm(...);
psd(hMTM,...,'SpectrumType','twosided');
% when x is real and you want a two-sided spectrum 
pmtm(...,'twosided');
% Two-sided spectrum with DC (0 frequency)in 
% the center
hMTM = spectrum.mtm(...);
psd(hMTM,...,'SpectrumType','twosided'...
'CenterDC',true);
% Two-sided spectrum with DC (0 frequency)in 
% the center
pmtm(...,'centered'); 
hMTM = spectrum.mtm(...);
psd(hMTM,...,'ConfLevel',p);
pmtm(...,'ConfidenceLevel',p); 
hMTM = spectrum.mtm(...);
hPSD = psd(hMTM,...);
Pxx = hPSD.Data;
F = hPSD.Frequencies;
[Pxx, F] = pmtm(...);
hMTM = spectrum.mtm(...);
hPSD = psd(hMTM,x,'ConfLevel',p);
Pxx = hPSD.Data;
F = hPSD.Frequencies;
Pxxc = hPSD.ConfInterval;
[Pxx,F,Pxxc] = pmtm(x,'ConfidenceLevel',p);

Was this topic helpful?