inv的用法

/和\可以用来求逆,A/B相当于A*inv(B),A\B相当于inv(A)*B。

inv([1 2;3 4])矩阵求逆,只能对方阵操作。

Y = inv(X) returns theinverse of the square matrix X. A warning messageis printed if X is badly scaled or nearly singular.

In practice, it is seldom necessary to form the explicit inverseof a matrix. A frequent misuse of inv arises whensolving the system of linear equations Ax = b.One way to solve this is with x = inv(A)*b.A better way, from both an execution time and numerical accuracy standpoint,is to use the matrix division operator x = A\b.This produces the solution using Gaussian elimination, without formingthe inverse. See mldivide (\)for further information.

inv是矩阵求逆的意思。具体用法A=inv(B),其中B是输入的可逆矩阵,输出A就是B的逆矩阵,逆矩阵满足性质 AB=BA=E (E是单位阵)。如果输入的是不可逆矩阵会弹出警告,并返回inf。

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容