Factorization of syms class objects
Mostrar comentarios más antiguos
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 comentarios
Sean de Wolski
el 16 de Dic. de 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
el 16 de Dic. de 2011
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Common Operations en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!