Linsolve 线性解决方案


Solve a linear system of equations
解决一个线性方程系统
 
Syntax
语法
 
X = linsolve(A,B)
X = linsolve(A,B,opts)
 
Description
描述
 
X = linsolve(A,B) solves the linear system A*X = B using LU factorization with partial pivoting when A is square and QR factorization with column pivoting otherwise. The number of columns of A must equal the number of rows of B must have the same number of rows. If A is m-by-n and B is n-by-k, then X is m-by-k. linsolve returns a warning if A is square and ill conditioned or if it is not square and rank deficient.
X=linsolve(A,B)解决线性系统A*X=B,以LU函数与片面的要点当A是正矩阵并且QR函数与列旋转其他方式。A矩阵的列数必须与B矩阵的行数相等。如果A矩阵是mn并且B矩阵是nk,然后Xmk。如果A矩阵是正矩阵并且有错误情况或者如果它不是正矩阵并且阶数不足,这两种情况下线性解决方案返回一个警告。
 
[X, R] = linsolve(A,B) suppresses these warnings and returns R, which is the reciprocal of the condition number of A if A is square, or the rank of A if A is not square.
[X,R]=linsolve(A,B) 取缔那些警告并且返回R,如果A是正矩阵则R便是A矩阵的条件数的对等。如果A矩阵不是正矩阵,则R或者是A矩阵的阶。
 
X = linsolve(A,B,opts) solves the linear system A*X = B or A'*X = B, using the solver that is most appropriate given the properties of the matrix A, which you specify in opts. For example, if A is upper triangular, you can set opts.UT = true to make linsolve use a solver designed for upper triangular matrices. If A has the properties in opts, linsolve is faster than mldivide, because linsolve does not perform any tests to verify that A has the specified properties.
X = linsolve(A,B,opts)解决线性系统A*X=B或者A'*X=B,通常这个解决方案是A矩阵最为适当特定的特征,这便要看你所做的具体选择。举个例子,如果A矩阵是上三角矩阵,你能够调整选择。UT=true 使线性解决方案使用一个上三角矩阵筹划的方案。如果A矩阵选择而具有了这个特性,线性解决方案是较快于mldivide,因为线性解决方案不执行任何测试A矩阵具有特定特征的证明。
 
Caution    If A does not have the properties that you specify in opts, linsolve returns incorrect results and does not return an error message. If you are not sure whether A has the specified properties, use mldivide instead.
警示 如果A矩阵不具有你所指定的这个特征,线性解决方案返回错误结果并且没有返回任何错误信息。如果你无论如何也无法确定A矩阵具有特定特征,使用mldivide代替。
 
The TRANSA field of the opts structure specifies the form of the linear system you want to solve:
选择结构特定的TRANSA字段来自你想要解决的线性系统:
 
·If you set opts.TRANSA = false, linsolve(A,B,opts) solves A*X = B.
如果你调整选择。TRANSA=falselinsolve(A,B,opts)解决A*X=B
 
·If you set opts.TRANSA = true, linsolve(A,B,opts) solves A'*X = B.
如果你调整选择。TRANSA=truelinsolve(A,B,opts)解决A'*X=B
 
The following table lists all the field of opts and their corresponding matrix properties. The values of the fields of opts must be logical and the default value for all fields is false.
下面的表格列出了所有的选择字段并且它对应矩阵的特征。所选择的选择字段的值必须顺利成章并且默认的字段值均是false
Field Name
字段名称
Matrix Property
矩阵特征
LT
Lower triangular
下三角矩阵
UT
Upper triangular
上三角矩阵
UHESS
Upper Hessenberg
SYM
Real symmetric or complex Hermitian
POSDEF
Positive definite
RECT
General rectangular
TRANSA
Conjugate transpose -- specifies whether the function solves A*X = B or A'*X = B

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值