MATLAB 帮助中心
通过前代求解下三角方程组
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 = R'\B,其中输出变量 x 的数据类型由 outputType 指定。
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 必须有符号,并使用二进制小数点定标。定点数据类型不支持斜率偏置表示。
在 R2020b 中推出
fixed.backwardSubstitute | fixed.qlessQR | fixed.qlessQRUpdate | fixed.qrAB | fixed.qrMatrixSolve | fixed.qlessQRMatrixSolve
fixed.backwardSubstitute
fixed.qlessQR
fixed.qlessQRUpdate
fixed.qrAB
fixed.qrMatrixSolve
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.
选择网站
选择网站以获取翻译的可用内容,以及查看当地活动和优惠。根据您的位置,我们建议您选择:。
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 MathWorks 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
欧洲
亚太
联系您当地的办事处