## ノンパラメトリック スペクトル オブジェクトから関数への置き換え

### ピリオドグラム PSD オブジェクトから関数への置き換え構文

`spectrum.periodogram` オブジェクトの構文は将来削除される予定です。次の表は `periodogram` に相当する推奨関数構文の一覧です。修正ピリオドグラムでは、既定の箱型ウィンドウ以外のウィンドウを使用します。修正ピリオドグラムの構文の説明において、表では特定のウィンドウを使用しています。各例の `x` は入力信号です。

```h = spectrum.periodogram; psd(h,x); ```
`periodogram(x);`
```% Modified periodogram with window function h = spectrum.periodogram('hamming'); psd(h,x); ```
```win = hamming(length(x)); periodogram(x,win);```
```% Window function and optional input arguments to window function h = spectrum.periodogram({'Hamming','periodic'}); psd(h,x); ```
```win = hamming(length(x),'periodic'); periodogram(x,win);```
```% Taylor window and multiple optional input arguments nbar = 4; sll = 30; h = spectrum.periodogram({'Taylor',nbar,sll}); psd(h,x,'Fs',fs,'centerdc',true); ```
```nbar = 4; sll = -30; win = taylorwin(length(x),nbar,sll); periodogram(x,win,[],fs,'centered');```
```h = spectrum.periodogram(...); psd(h,x,'NFFT',nfft); ```
```win = ... periodogram(x,win,nfft); ```
```h = spectrum.periodogram(...); psd(h,x,'Fs',fs); ```
```win = ... periodogram(x,win,[],fs); ```
```h = spectrum.periodogram(...); psd(h,x,'NFFT',nfft,'Fs',fs); ```
```win = ... periodogram(x,win,nfft,fs); ```
```h = spectrum.periodogram(...); psd(h,x,...,'FreqPoints','User Defined',... 'FrequencyVector',w); ```
```win = ... periodogram(x,win,w); ```
```h = spectrum.periodogram(...); psd(h,x,'FreqPoints','User Defined',... 'FrequencyVector',f,'Fs',fs); ```
```win = ... periodogram(x,win,f,fs);```
```% Two-sided spectrum of a real signal h = spectrum.periodogram(...); psd(h,x,...,'SpectrumType','TwoSided'); ```
```win = ... periodogram(x,win,...,'twosided'); ```
```% Two-sided spectrum with DC (0 frequency) in the center h = spectrum.periodogram(...); psd(h,x,...,'CenterDC',true); ```
```win = ... periodogram(x,win,...,'centered'); ```
```h = spectrum.periodogram(...); psd(h,x,...,'ConfLevel',p); ```
```win = ... periodogram(x,win,...,'ConfidenceLevel',p);```
```h = spectrum.periodogram(...); hPSD = psd(h,x,...); Pxx = hPSD.Data; F = hPSD.Frequencies; ```
```win = ... [Pxx,F] = periodogram(x,win,...); ```
```h = spectrum.periodogram(...); hPSD = psd(h,x,...,'ConfLevel',p); Pxx = hPSD.Data; F = hPSD.Frequencies; Pxxc = hPSD.ConfInterval; ```
```win = ... [Pxx,F,Pxxc] = periodogram(x,win,...); ```

### ピリオドグラム MSSPECTRUM オブジェクトから関数への置き換え構文

`spectrum.periodogram` MSSPECTRUM オブジェクトの構文は将来削除される予定です。次の表は `periodogram` に相当する推奨関数構文の一覧です。修正ピリオドグラムでは、既定の箱型ウィンドウ以外のウィンドウを使用します。修正ピリオドグラムの構文の説明において、表では特定のウィンドウを使用しています。各例の `x` は入力信号です。

```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,win,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');```
```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'); ```

### ウェルチ PSD オブジェクトから関数への置き換え構文

`spectrum.welch` オブジェクトの構文は将来削除される予定です。次の表は `pwelch` に相当する推奨関数構文の一覧です。修正ピリオドグラムの構文の説明において、表では特定のウィンドウを使用しています。各例の `x` は入力信号です。

```h = spectrum.welch; psd(h,x); ```
`pwelch(x);`
```h = spectrum.welch('Gaussian'); psd(h,x); ```
```win = gausswin(64); pwelch(x,win);```
```% Welch estimate with window function and optional input arguments h = spectrum.welch({'Hamming','periodic'}); psd(h,x); ```
```win = hamming(64,'periodic'); pwelch(x,win);```
```% Taylor window and multiple optional input arguments nbar = 4; sll = 30; h = spectrum.welch({'Taylor', nbar, sll}); psd(h,x); ```
```nbar = 4; sll = -30; win = taylorwin(64,nbar,sll); pwelch(x,win);```
```h = spectrum.welch('Hamming',segLen); psd(h,x); ```
```win = hamming(segLen); pwelch(x,win);```
```h = spectrum.welch({'Hamming','periodic'},... segLen); psd(h,x); ```
```win = hamming(segLen,'periodic'); pwelch(x,win);```
```nbar = 4; sll = 30; h = spectrum.welch({'Taylor',nbar,sll},... segLen); psd(h,x); ```
```nbar = 4; sll = -30; win = taylorwin(segLen,nbar,sll); pwelch(x,win);```
```h = spectrum.welch('Hamming',segLen,ovlpPct); psd(h,x); ```
```win = hamming(segLen); Noverlap = ceil((ovlpPct/100)*segLen); pwelch(x,win,Noverlap); ```
```h = spectrum.welch({'Hamming','periodic'},... segLen,ovlpPct); psd(h,x); ```
```win = hamming(segLen,'periodic'); Noverlap = ceil((ovlpPct/100)*segLen); pwelch(x,win,Noverlap); ```
```nbar = 4; sll = 30; h = spectrum.welch({'Taylor',nbar,sll},... segLen,ovlpPct); psd(h,x); ```
```nbar = 4; sll = -30; win = taylorwin(segLen,nbar,sll); Noverlap = ceil((ovlpPct/100)*segLen); pwelch(x,win,Noverlap); ```
```h = spectrum.welch(...); psd(h,x,'NFFT',nfft); ```
```win = ... Noverlap = ... pwelch(x,win,Noverlap,nfft); ```
```h = spectrum.welch(...); psd(h,x,'Fs',fs); ```
```win = ... Noverlap = ... pwelch(x,win,Noverlap,[],fs); ```
```h = spectrum.welch(...); psd(h,x,'NFFT',nfft,'Fs',fs); ```
```win = ... Noverlap = ... pwelch(x,win,Noverlap,nfft,fs); ```
```h = spectrum.welch(...); psd(h,x,...,'FreqPoints','User Defined',... 'FrequencyVector',w); ```
```win = ... periodogram(x,win,w); ```
```h = spectrum.periodogram(...); psd(h,x,'FreqPoints','User Defined',... 'FrequencyVector',f,'Fs',fs); ```
```win = ... Noverlap = ... pwelch(x,win,Noverlap,f,fs); ```
```% Two-sided spectrum of a real signal h = spectrum.welch(...); psd(h,x,...,'SpectrumType','TwoSided'); ```
```win = ... Noverlap = ... pwelch(x,win,Noverlap,...,'twosided'); ```
```% Two-sided spectrum with DC (0 frequency) in the center h = spectrum.welch(...); psd(h,x,...,'CenterDC',true); ```
```win = ... Noverlap = ... pwelch(x,win,Noverlap,...,'centered'); ```
```h = spectrum.welch(...); psd(h,x,...,'ConfLevel',p); ```
```win = ... Noverlap = ... pwelch(x,win,Noverlap,...'ConfidenceLevel',p);```
```h = spectrum.welch(...); hPSD = psd(h,x,...); Pxx = hPSD.Data; F = hPSD.Frequencies; ```
```win = ... Noverlap = ... [Pxx,F] = pwelch(x,win,Noverlap,...); ```
```h = spectrum.periodogram(...); hPSD = psd(h,x,...,'ConfLevel',p); Pxx = hPSD.Data; F = hPSD.Frequencies; Pxxc = hPSD.ConfInterval; ```
```win = ... Noverlap = ... [Pxx,F,Pxxc] = pwelch(x,win,Noverlap,... 'ConfidenceLevel',p); ```

### ウェルチ MSSPECTRUM オブジェクトから関数への置き換え構文

`spectrum.welch` MSSPECTRUM オブジェクトの構文は将来削除される予定です。次の表は `pwelch` に相当する推奨関数構文の一覧です。修正ピリオドグラムでは、既定の箱型ウィンドウ以外のウィンドウを使用します。修正ピリオドグラムの構文の説明において、表では特定のウィンドウを使用しています。各例の `x` は入力信号です。

```h = spectrum.welch msspectrum(h,x); ```
```win = hamming(64); pwelch(x,win,[],'power'); ```
```h = spectrum.welch('Gaussian'); msspectrum(h,x); ```
```win = gausswin(64); pwelch(x,win,[],'power');```
```h = spectrum.welch({'Hamming','periodic'}); msspectrum(h,x); ```
```win = hamming(64,'periodic'); pwelch(x,win,[],'power');```
```nbar = 4; sll = 30; h = spectrum.welch({'Taylor',nbar,sll}); msspectrum(h,x); ```
```nbar = 4; sll = -30; win = taylorwin(64,nbar,sll); pwelch(x,win,[],'power');```
```segLen = 128; h = spectrum.welch('Hamming',segLen); msspectrum(h,x); ```
```win = hamming(128); pwelch(x,win,[],'power');```
```segLen = 128; h = spectrum.welch({'Hamming','periodic'},... segLen); msspectrum(h,x); ```
```win = hamming(128,'periodic'); pwelch(x,win,[],'power');```
```nbar = 4; sll = 30; segLen = 128; h = spectrum.welch({'Taylor',nbar,sll},segLen); msspectrum(h,x); ```
```nbar = 4; sll = -30; segLen = 128; win = taylorwin(segLen,nbar,sll); pwelch(x,win,[],'power');```
```segLen = 128; ovlpPct = 50; h = spectrum.welch('Hamming',segLen,ovlpPct); msspectrum(h,x); ```
```segLen = 128; win = hamming(segLen); ovlpPct = 50; Noverlap = ceil((ovlpPct/100)*segLen); pwelch(x,win,Noverlap,'power'); ```
```segLen = 128; ovlpPct = 50; h = spectrum.welch({'Hamming','periodic'},... segLen,ovlpPct); msspectrum(h,x); ```
```segLen = 128; ovlpPct = 50; win = hamming(segLen,'periodic'); Noverlap = ceil((ovlpPct/100)*segLen); pwelch(x,win,Noverlap,'power'); ```
```nbar = 4; sll = 30; segLen = 128; ovlpPct = 50; h = spectrum.welch({'Taylor',nbar,sll},... segLen,ovlpPct); msspectrum(h,x); ```
```nbar = 4; sll = -30; segLen = 128; win = taylorwin(segLen,nbar,sll); ovlpPct = 50; Noverlap = ceil((ovlpPct/100)*segLen); pwelch(x,win,Noverlap,'power'); ```
```h = spectrum.welch(...); msspectrum(h,x,'NFFT',nfft); ```
```win = ... Noverlap = ... pwelch(x,win,Noverlap,nfft,'power'); ```
```h = spectrum.welch(...); msspectrum(h,x,'Fs',fs); ```
```win = ... Noverlap = ... pwelch(x,win,Noverlap,[],fs,'power'); ```
```h = spectrum.welch(...); msspectrum(h,x,'NFFT',nfft,'Fs',fs); ```
```win = ... Noverlap = ... pwelch(x,win,Noverlap,nfft,fs,'power'); ```
```h = spectrum.welch(...); msspectrum(h, x,...,'FreqPoints','User Defined',... 'FrequencyVector',w); ```
```win = ... Noverlap = ... pwelch(x,win,Noverlap,f,fs,'power'); ```
```h = spectrum.welch(...); msspectrum(h,x,...,'SpectrumType','TwoSided'); ```
```win = ... Noverlap = ... pwelch(x,win,Noverlap,...,'twosided','power'); ```
```h = spectrum.welch(...); msspectrum(h,x,...,'CenterDC',true); ```
```win = ... Noverlap = ... pwelch(x,win,Noverlap,...,'centered','power'); ```
```h = spectrum.welch(...); msspectrum(h,x,...,'ConfLevel',p); ```
```win = ... Noverlap = ... pwelch(x,win,Noverlap,...,'ConfidenceLevel',p,'power'); ```
```h = spectrum.welch(...); hMS = msspectrum(h,x,...); Sxx = hMS.Data; F = hMS.Frequencies; ```
```[Sxx,F] = pwelch(...,'power'); ```
```h = spectrum.welch(...); hMS = msspectrum(h, x, …, 'ConfLevel', p); Sxx = hMS.Data; F = hMS.Frequencies; Sxxc = hMS.ConfInterval; ```
`[Sxx,F,Sxxc] = pwelch(...,'ConfidenceLevel',p,'power'); `

### マルチテーパー PSD オブジェクトから関数への置き換え構文

`spectrum.mtm` オブジェクトの構文は将来削除される予定です。次の表は `pmtm` に相当する推奨関数構文の一覧です。各例の `x` は入力信号です。

```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);`