diric
ディリクレ関数または周期的 sinc 関数
説明
例
N = 7 と N = 8 の場合について、 から の区間でディリクレ関数を計算してプロットします。この関数の周期は、N が奇数の場合は 、N が偶数の場合は となります。
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 関数は の関係にあります。 の場合のこの関係を示します。sinc 関数の比が (、 は整数) であることを指定して、不定式にならないようにします。
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; 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
は要素単位の演算になります。
データ型: double
| single
関数の次数。正の整数スカラーとして指定します。
データ型: double
| single
詳細
ディリクレ関数、すなわち周期 sinc 関数は
です。ここで N は非ゼロの任意の整数です。
この関数の周期は、N が奇数の場合は 2π、N が偶数の場合は 4π となります。すべての N で最大値は 1 であり、最小値は N が偶数の場合は –1 です。関数の振幅は、N 点箱型ウィンドウの離散時間フーリエ変換の振幅の 1/N 倍です。
拡張機能
C/C++ コード生成
MATLAB® Coder™ を使用して C および C++ コードを生成します。
バージョン履歴
R2006a より前に導入
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Web サイトの選択
Web サイトを選択すると、翻訳されたコンテンツにアクセスし、地域のイベントやサービスを確認できます。現在の位置情報に基づき、次のサイトの選択を推奨します:
また、以下のリストから Web サイトを選択することもできます。
最適なサイトパフォーマンスの取得方法
中国のサイト (中国語または英語) を選択することで、最適なサイトパフォーマンスが得られます。その他の国の MathWorks のサイトは、お客様の地域からのアクセスが最適化されていません。
南北アメリカ
- América Latina (Español)
- Canada (English)
- United States (English)
ヨーロッパ
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)