MATLAB: Trigonometric equation solving matlab

matrixmatrix manipulationSymbolic Math Toolbox

syms a1 a2 theta1 theta2
alpha1=-(pi/2);
alpha2=0;
When i am solving the following equation in command prompt. sin(theta1)*cos(alpha1)
ans =
-(4035888341267763*sin(theta1))/9007199254740992
Now i need the output as -sin(theta1) because cos(-90) is -1. I need to round of the decimal value.

Best Answer

HUH? The solution you show in ans does not follow from what you have written above that. So it is literally impossible to know what you are doing since you have not provided useful information for us to answer.
Anyway, you need to learn to use vpa. This will resolve those long integers that the symbolic TB tends to generate.