Ask Your Question

Mickey_Phipps's profile - activity

2019-03-20 17:05:13 +0200 asked a question Solve symbolic matrix cell

I'm trying to take a cell from a matrix and solve for a variable symbolically. When I run this, I get the error:

TypeError: The first argument must be a symbolic expression or a list of symbolic expressions.

This is the code I am trying to execute:

Rz = matrix([[cos(a),-sin(a),0,0],[sin(a),cos(a),0,0],[0,0,1,0],[0,0,0,1]])
Ry = matrix([[cos(b),0,sin(b),0],[0,1,0,0],[-sin(b),0,cos(b),0],[0,0,0,1]])
Rx = matrix([[1,0,0,0],[0,cos(c),-sin(c),0],[0,sin(c),cos(c),0],[0,0,0,1]])
P = matrix([[x],[y],[z],[1]])

Rzyxp = Rz * Ry * Rx * P

eqn2 = Rzyxp[2]

result1 = solve(eqn2==0, b)

Any help would be appreciated