trigonometry - Solve trigonometrics equations in Matlab -
i'm trying solve t trigonometric equations in matlab, i.e. 7*cos(t) + 5*sin(t) = 0
. solve as: sin(t)/cos(t) = -7/5
, find arctan(-7/5) = -0.9505
.
i have tried on matlab using solve function:
syms t theta = solve(7*cos(t) + 5*sin(t)==0, t); disp(theta);
but -(log(- 12/37 - (35*i)/37)*i)/2
instead of -0.9505
. explain me why answer solve , how -0.9505
?
the expression exact result, expressed symbolically (due use of syms).
to make matlab display result in format looking use double(theta)
which should give you:
double(theta) ans = -0.9505
Comments
Post a Comment