Factorization of syms class objects
Ältere Kommentare anzeigen
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 Kommentare
Sean de Wolski
am 16 Dez. 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
am 16 Dez. 2011
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Common Operations finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!