Solve for a matrix in a generic matrix equation?

1 visualización (últimos 30 días)
Eric Zhang
Eric Zhang el 28 de Jul. de 2016
Respondida: Walter Roberson el 28 de Jul. de 2016
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?

Respuesta aceptada

Walter Roberson
Walter Roberson el 28 de Jul. de 2016
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.

Más respuestas (0)

Categorías

Más información sobre Symbolic Math Toolbox en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by