Factorization of syms class objects
Afficher commentaires plus anciens
I create Syms class matrices with elements taking a similar structure to this,
a11*(a1*a4*a7 + a2*a5*a9) + a3*a7*a11
I wish to factor each cell in such a way that there is no reptition of variables. In cases such as the above using 'factor' or 'simplify' only removes the common factor 'a11' from the term yielding,
a11*(a3*a7 + a1*a4*a7 + a2*a5*a9).
However, i am looking for 'a7' to also be factored out; thus yielding,
a11*( a7*(a3 + a1*a4) + a2*a5*a9).
I am interested to hear if anyone has an approach for dealing with such a problem.
Regards
Ross
Note: The methods applied to reach the original matrix would never return solutions which could not be factored in such a way that every variable occurs only once in the term.
2 commentaires
Sean de Wolski
le 16 Déc 2011
Just a note: Naming a variable a11 is very hard to understand since it looks like all, a very useful builtin function.
ross montgomery
le 16 Déc 2011
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Common Operations dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!