Solve for a matrix in a generic matrix equation?

1 回表示 (過去 30 日間)
Eric Zhang
Eric Zhang 2016 年 7 月 28 日
回答済み: Walter Roberson 2016 年 7 月 28 日
My past experience with MATLAB was solving for a matrix that has a simple solution (can be solved "as a whole"). For example, solving for X in AX=B is simply X=A\B assuming A is invertible.
What about solving for X in a complicated (or more generic) equation, where there is no simple solution like the one above? For example, \sum_{i=1}^{N} A_i*X'*X*A_i = B (just an illustrative example made up on the fly -- hopefully, there is no simple solution).
In this case, we need to spell out all the entries of X and form many equations to solve for each entry of X. Is there a clean way in MATLAB of doing this?

採用された回答

Walter Roberson
Walter Roberson 2016 年 7 月 28 日
In earlier versions of MATLAB you did have to construct separate equations and have them as distinct arguments to solve(). However, the last few releases it has been possible to create matrices of equations, which can make things a bit easier.
You do, however, still need to construct all of the entries. The engine underlying the symbolic toolbox does not have support for generic matrices of undefined size. You cannot, for example, say "A and B are matrices and x is a vector, now show me the general form of the solution to A*x == B". You cannot get out a general form like "inv(A)*B" as a solution. That is possible with some other symbolic packages but not with MATLAB's symbolic engine.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSymbolic Math Toolbox についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by