# Documentation

## Multitaper PSD Object to Function Replacement Syntax

The `spectrum.mtm` object syntax will be removed in the future. The following table gives the equivalent recommended function syntax for `pmtm`. In each example, `x` is the input signal.

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');`
```hMTM = spectrum.mtm(...); psd(hMTM,...,'SpectrumType','twosided'); ```
`pmtm(...,'twosided');`
```hMTM = spectrum.mtm(...); psd(hMTM,...,'SpectrumType','twosided',... 'CenterDC',true); ```
`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);`