I'm using sympy to generate some latex output, and I would like to create
an expression by multiplying several matrices, but I don't want it to
simply the expression.
A simple example:
I have
x, y, ori = sympy.symbols('x y ori')
T = Matrix([
[1, 0, -x],
[0, 1, -y],
[0, 0, 1]])
R = Matrix([
[ cos(ori), sin(ori), 0],
[-sin(ori), cos(ori), 0],
[ 0, 0, 1]])
A = R.multiply(T)
Currently sympy.latex(A) looks something like:
[[ cos(ori), sin(ori), -x*cos(ori) - y*sin(ori)],
[-sin(ori), cos(ori), x*sin(ori) - y*cos(ori)],
[ 0, 0, 1]])
But I would like something more like this:
[[ cos(ori), sin(ori), 0], [1, 0, -x],
[-sin(ori), cos(ori), 0], [0, 1, -y],
[ 0, 0, 1]]) * [0, 0, 1]]
Is it possible to disable the automatic expression evaluation?
--
You received this message because you are subscribed to the Google Groups
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit
https://groups.google.com/d/msgid/sympy/8242732a-f0bd-4510-8198-5ae9fb1c7b34%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.