ヘルプ センターヘルプ センター
このページの翻訳は最新ではありません。ここをクリックして、英語の最新版を参照してください。
ディリクレ関数または周期的 sinc 関数
y = diric(x,n)
例
y= diric(x,n)は、入力配列xの要素で評価された、次数nのディリクレ関数を返します。
y= diric(x,n)
y
x
n
すべて折りたたむ
N= 7 とN= 8 の場合について、 - 2 π から 2 π の区間でディリクレ関数を計算してプロットします。この関数の周期は、Nが奇数の場合は 2 π 、Nが偶数の場合は 4 π となります。
x = linspace(-2*pi,2*pi,301); d7 = diric(x,7); d8 = diric(x,8); subplot(2,1,1) plot(x/pi,d7) ylabel('N = 7') title('Dirichlet Function') subplot(2,1,2) plot(x/pi,d8) ylabel('N = 8') xlabel('x / \pi')
ディリクレ関数と sinc 関数は D N ( π x ) = s i n c ( N x / 2 ) / s i n c ( x / 2 ) の関係にあります。 N = 6 の場合のこの関係を示します。sinc 関数の比が ( - 1 ) k ( N - 1 ) ( x = 2 k 、 k は整数) であることを指定して、不定式にならないようにします。
xmax = 4; x = linspace(-xmax,xmax,1001)'; N = 6; yd = diric(x*pi,N); ys = sinc(N*x/2)./sinc(x/2); ys(~mod(x,2)) = (-1).^(x(~mod(x,2))/2*(N-1)); subplot(2,1,1) plot(x,yd) title('D_6(x*pi)') subplot(2,1,2) plot(x,ys) title('sinc(6*x/2) / sinc(x/2)')
N = 13 の場合の計算を繰り返します。
N = 13; yd = diric(x*pi,N); ys = sinc(N*x/2)./sinc(x/2); ys(~mod(x,2)) = (-1).^(x(~mod(x,2))/2*(N-1)); subplot(2,1,1) plot(x,yd) title('D_{13}(x*pi)') subplot(2,1,2) plot(x,ys) title('sinc(13*x/2) / sinc(x/2)')
入力配列。実数のスカラー、ベクトル、行列、または N 次元配列として指定します。xが非スカラーの場合、diricは要素単位の演算になります。
diric
データ型:double|single
double
single
関数の次数。正の整数スカラーとして指定します。
出力配列。xと同じサイズの実数値のスカラー、ベクトル、行列、または N 次元配列として返されます。
ディリクレ関数、すなわち周期 sinc 関数は
D N ( x ) = { sin ( N x / 2 ) N sin ( x / 2 ) x ≠ 2 π k , k = 0 , ± 1 , ± 2 , ± 3 , ... ( − 1 ) k ( N − 1 ) x = 2 π k , k = 0 , ± 1 , ± 2 , ± 3 , ...
です。ここで N は非ゼロの任意の整数です。
この関数の周期は、N が奇数の場合は 2π、N が偶数の場合は 4π となります。すべての N で最大値は 1 であり、最小値は N が偶数の場合は –1 です。関数の振幅は、N 点箱型ウィンドウの離散時間フーリエ変換の振幅の1/N倍です。
R2006a より前に導入
cos|gauspuls|pulstran|rectpuls|sawtooth|sin|sinc|square|tripuls
cos
gauspuls
pulstran
rectpuls
sawtooth
sin
sinc
square
tripuls
この例の変更されたバージョンがあります。編集された方の例を開きますか?
次の MATLAB コマンドに対応するリンクがクリックされました。
コマンドを MATLAB コマンド ウィンドウに入力して実行してください。Web ブラウザーは MATLAB コマンドをサポートしていません。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select:.
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office