Solve for a matrix in a generic matrix equation?

1 次查看(过去 30 天)
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 CenterFile Exchange 中查找有关 Symbolic Math Toolbox 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by