fixed.backwardSubstitute
後退代入を使用した上三角方程式系の求解
説明
例
前進代入と後退代入を使用した方程式系の求解
この例では、前進代入と後退代入を使用して方程式系 を解く方法を示します。
入力変数 A
および B
を指定します。
rng default; A = gallery('randsvd', [5,3], 1000); b = [1; 1; 1; 1; 1];
A
の上三角因子 R
を計算します。ここで、 です。
R = fixed.qlessQR(A);
前進代入と後退代入を使用して X
の値を計算します。
X = fixed.forwardSubstitute(R,b); X(:) = fixed.backwardSubstitute(R,X)
X = 5×1
105 ×
-0.9088
2.7123
-0.8958
0
0
この解は関数 fixed.qlessQRMatrixSolve
を使用した場合と等価です。
x = fixed.qlessQRMatrixSolve(A,b)
x = 5×1
105 ×
-0.9088
2.7123
-0.8958
0
0
入力引数
R
— 上三角入力行列
行列
上三角入力。行列として指定します。
データ型: single
| double
| fi
複素数のサポート: あり
C
— 線形システムの因子
行列
線形システムの因子。行列として指定します。
データ型: single
| double
| fi
複素数のサポート: あり
outputType
— 出力データ型
numerictype
オブジェクト | 数値変数
出力データ型。numerictype
オブジェクトまたは数値変数として指定します。outputType
が numerictype
オブジェクトとして指定されている場合、出力 x
は指定されたデータ型をもちます。outputType
が数値変数として指定されている場合、x
はその数値変数と同じデータ型をもちます。
データ型: single
| double
| int8
| int16
| int32
| int64
| uint8
| uint16
| uint32
| uint64
| logical
| fi
| numerictype
出力引数
x
— 解決法
行列
解。方程式 x = R\C を満たす行列として返されます。
拡張機能
C/C++ コード生成
MATLAB® Coder™ を使用して C および C++ コードを生成します。
倍精度、単精度および固定小数点データ型のコードを生成します。
固定小数点の変換
Fixed-Point Designer™ を使用して固定小数点システムの設計とシミュレーションを行います。
R と C は符号付きで、2 進小数点スケーリングを使用しなければなりません。勾配とバイアス表現は固定小数点データ型ではサポートされていません。
バージョン履歴
R2020b で導入
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)