Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
5.3.2 - 日本語

Change language to:
English - Français - Português

Please note that the recommended version of Scilab is 2024.0.0. This page might be outdated.
See the recommended documentation of this function

Scilab help >> Signal Processing > cspect

cspect

相関法により2つの離散時間信号の間で推定する 両側相互スペクトル

呼び出し手順

[sm [,cwp]]=cspect(nlags,npoints,wtype,x [,y] [,wpar])
[sm [,cwp]]=cspect(nlags,npoints,wtype,nx [,ny] [,wpar])

パラメータ

x

ベクトル, 最初の信号のデータ.

y

ベクトル, 二番目の信号のデータ. yを 省略した場合,xに等しいと仮定されます(自己相関). 指定された場合,xと同じ数の要素を有している必要が あります.

nx

スカラー : x信号の点の数. この場合, 信号xのセグメントはgetxという名前のユーザ定義の関数 により読み込まれます (下記参照).

ny

スカラー : y信号の点の数. この場合, yのセグメントが gety という名前のユーザ定義関数により読み込まれます (下記参照). 指定された場合,nynxに 等しくする必要があります.

nlags

相関遅延の数s (正の整数)

npoints

変換する点の数 (正の整数)

wtype

ウインドウ型

  • 're': 矩形

  • 'tr': 三角形

  • 'hm': ハミング

  • 'hn' : ハニング

  • 'kr': カイザー,この場合,wpar 引数を指定する必要があります

  • 'ch': チェビシェフ, この場合, wpar 引数を指定する必要があります

wpar

Kaiser および Chebyshev ウインドウに関するオプションパラメータ:

  • 'kr': wpar は厳密に正の数である必要があります

  • 'ch': wpar は要素数2のベクトル [main_lobe_width,side_lobe_height]である必要があります. ただし,0<main_lobe_width<.5, および side_lobe_height>0

sm

正規化された周波数の間隔[0,1]において パワースペクトルを推定します. 大きさnpointsの行配列です. 自己相関関数の場合は実数, 相互相関関数の場合は複素数の配列です.

cwp

チェビシェフウインドウの場合は,チェビシェフウインドウのパラメータ の未指定のもの. 指定されていないチェビシェフウインドウのパラメータ

説明

2つの信号x および yの 信号の相互スペクトル,そうでない場合は xを計算します. スペクトル密度は相関法により得られます.

The correlation method calculates the spectral estimate as the Fourier transform of a modified estimate of the auto/cross correlation function. This auto/cross correlation modified estimate consist of repeatedly calculating estimates of the autocorrelation function from overlapping sub-segments if the data, and then averaging these estimates to obtain the result.

The number of points of the window is 2*nlags-1.

For batch processing, thex and y data may be read segment by segment using the getxand gety user defined functions. These functions have the following calling sequence:

xk=getx(ns,offset) and yk=gety(ns,offset) where ns is the segment size and offset is the index of the first element of the segment in the full signal.

警告

5.0.2までのバージョンのScilabでは,返り値は 現在の値の絶対値でした.

参考文献

Oppenheim, A.V., and R.W. Schafer. Discrete-Time Signal Processing, Upper Saddle River, NJ: Prentice-Hall, 1999

rand('normal');rand('seed',0);
x=rand(1:1024-33+1);
//eqfirでローパスフィルタを作成m
nf=33;bedge=[0 .1;.125 .5];des=[1 0];wate=[1 1];
h=eqfir(nf,bedge,des,wate);
//有色のデータを得るために白色のデータをフィルタ処理
h1=[h 0*ones(1:max(size(x))-1)];
x1=[x 0*ones(1:max(size(h))-1)];
hf=fft(h1,-1);   xf=fft(x1,-1);yf=hf.*xf;y=real(fft(yf,1));
sm=cspect(100,200,'tr',y);
smsize=max(size(sm));fr=(1:smsize)/smsize;
plot(fr,log(sm))

参照

  • pspect — Welchの平均ペリオドグラム法による 2つの離散時間信号の間の両面相互スペクトル推定.
  • mese — スペクトル推定の最大エントロピ
  • corr — 相関 , 共分散

作者

C. Bunks INRIA

<< corr Signal Processing czt >>

Copyright (c) 2022-2023 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Thu May 12 11:45:54 CEST 2011