Solving an equation through optimization..........
1 回表示 (過去 30 日間)
古いコメントを表示
Y=Ax
y is a mX1 matrix
A is a mXn matrix
x is a nX1 matrix
AA'=I
Here we apply optimization technique to solve x instead of taking inverse of A. Will you explain me why...............Please help me........
0 件のコメント
採用された回答
Walter Roberson
2013 年 2 月 25 日
inverse is only strictly defined for square matrices.
You could use pinv() or the backslash operator ('\')
7 件のコメント
Walter Roberson
2013 年 2 月 25 日
There are good reasons to not use inv however. The main one is
numerical considerations.
Here is the second paragraph of the description for inv in the documentation:
In practice, it is seldom necessary to form the explicit inverse of a matrix. A frequent misuse of inv arises when solving the system of linear equations.
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 forming the inverse. See \ and / for further information.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Nonlinear Optimization についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!