このページの内容は最新ではありません。最新版の英語を参照するには、ここをクリックします。
triangularPulse
三角パルス関数
説明
例
三角パルス関数のプロット
三角パルス関数の計算
次の数値について三角パルス関数を計算します。これらの数値はシンボリック オブジェクトではないため、結果は浮動小数点数となります。
[triangularPulse(-2, 0, 2, -3) triangularPulse(-2, 0, 2, -1/2) triangularPulse(-2, 0, 2, 0) triangularPulse(-2, 0, 2, 3/2) triangularPulse(-2, 0, 2, 3)]]
ans = 0 0.7500 1.0000 0.2500 0
数値をシンボリック オブジェクトに変換して同じ値をシンボリックに計算します。
[triangularPulse(sym(-2), 0, 2, -3) triangularPulse(-2, 0, 2, sym(-1/2)) triangularPulse(-2, sym(0), 2, 0) triangularPulse(-2, 0, 2, sym(3/2)) triangularPulse(-2, 0, sym(2), 3)]
ans = 0 3/4 1 1/4 0
幅 2 の固定型三角パルス
triangularPulse(-1, 0, 1, x)
を計算するショートカットとして、入力引数を 1 つ指定して triangularPulse
を使用します。
syms x triangularPulse(x)
ans = triangularPulse(-1, 0, 1, x)
対称な三角パルス
triangularPulse(a, (a + c)/2, c, x)
を計算するショートカットとして、入力引数を 3 つ指定して triangularPulse
を使用します。
syms a c x triangularPulse(a, c, x)
ans = triangularPulse(a, a/2 + c/2, c, x)
三角パルス関数の特殊なケース
入力間の関係に応じて、triangularPulse
は特別な値を持ちます。
a < x < b
について三角パルス関数を計算します。
syms a b c x assume(a < x < b) triangularPulse(a, b, c, x)
ans = (a - x)/(a - b)
計算を続けるため、仮定を syms
を使用して変数を再作成することで削除します。
syms a b x
b < x < c
について三角パルス関数を計算します。
assume(b < x < c) triangularPulse(a, b, c, x)
ans = -(c - x)/(b - c)
計算を続行するよう仮定を消去します。
syms b c x
a = b
について三角パルス関数を計算します。
syms a b c x assume(b < c) triangularPulse(b, b, c, x)
ans = -((c - x)*rectangularPulse(b, c, x))/(b - c)
c = b
について三角パルス関数を計算します。
assume(a < b) triangularPulse(a, b, b, x)
ans = ((a - x)*rectangularPulse(a, b, x))/(a - b)
計算を続けるため a
、b
、c
に設定された仮定をすべて消去します。
syms a b c
入力引数
a
— 入力
-1
(既定値) | 数値 | シンボリック スカラー
入力。数値またはシンボリック スカラーとして指定します。この引数は、三角パルス関数の立ち上がりエッジを指定します。
c
— 入力
1
(既定値) | 数値 | シンボリック スカラー
入力。数値またはシンボリック スカラーとして指定します。この引数は、三角パルス関数の立ち下がりエッジを指定します。
x
— 入力
数値 | ベクトル | 行列 | 配列 | シンボリック数 | シンボリック変数 | シンボリック配列 | シンボリック関数 | シンボリック式
入力。数値、ベクトル、行列、または配列、あるいはシンボリック数、変数、配列、関数、または式で指定されます。
詳細
三角パルス関数
a < x < b
である場合、三角パルス関数は (x - a)/(b - a)
に等しくなります。
b < x < c
である場合、三角パルス関数は (c - x)/(c - b)
に等しくなります。
x <= a
または x >= c
である場合、三角パルス関数は 0 に等しくなります。
三角パルス関数は三角形関数、ハット関数、テント関数またはのこぎり波関数とも呼ばれます。
ヒント
バージョン履歴
R2012b で導入
参考
MATLAB コマンド
次の 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:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- 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)