ヘルプ センターヘルプ センター
前進代入を使用した下三角方程式系の求解
R2020b 以降
x = fixed.forwardSubstitute(R, B)
x = fixed.forwardSubstitute(R, B, outputType)
例
x = fixed.forwardSubstitute(R, B) は、上三角行列 R に対して前進代入を実行して x = R'\B を計算します。
x
R
B
x = fixed.forwardSubstitute(R, B, outputType) は、出力変数 x のデータ型を outputType で指定して、x = R'\B を返します。
outputType
すべて折りたたむ
この例では、前進代入と後退代入を使用して方程式系 (A′A)x=B を解く方法を示します。
入力変数 A および B を指定します。
A
rng default; A = gallery('randsvd', [5,3], 1000); b = [1; 1; 1; 1; 1];
A の上三角因子 R を計算します。ここで、A=QR です。
R = fixed.qlessQR(A);
前進代入と後退代入を使用して X の値を計算します。
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 を使用した場合と等価です。
fixed.qlessQRMatrixSolve
x = fixed.qlessQRMatrixSolve(A,b)
x = 5×1 105 × -0.9088 2.7123 -0.8958 0 0
上三角入力。行列として指定します。
データ型: single | double | fi 複素数のサポート: あり
single
double
fi
線形システムの因子。行列として指定します。
numerictype
出力データ型。numerictype オブジェクトまたは数値変数として指定します。outputType が numerictype オブジェクトとして指定されている場合、出力 x は指定されたデータ型をもちます。outputType が数値変数として指定されている場合、x はその数値変数と同じデータ型をもちます。
データ型: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64 | logical | fi | numerictype
int8
int16
int32
int64
uint8
uint16
uint32
uint64
logical
解。方程式 x = R'\B を満たす行列として返されます。
倍精度、単精度および固定小数点データ型のコードを生成します。
R と B は符号付きで、2 進小数点スケーリングを使用しなければなりません。勾配とバイアス表現は固定小数点データ型ではサポートされていません。
R2020b で導入
fixed.backwardSubstitute | fixed.qlessQR | fixed.qlessQRUpdate | fixed.qrAB | fixed.qrMatrixSolve | fixed.qlessQRMatrixSolve
fixed.backwardSubstitute
fixed.qlessQR
fixed.qlessQRUpdate
fixed.qrAB
fixed.qrMatrixSolve
次の 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