MATLAB: Solving an equation containing sine and cosine

equationtrigonometry

This might sound silly, so please be patient. I am not a complete beginner at Matlab but I seem to be stuck with this small problem: How do I solve for x? The equation is
A*cos(x)+B/sin(x)=C where A,B and C are constants
Thanks in advance.

Best Answer

If you have the symbolic toolbox, use SOLVE:
solve('A*cos(x)+B/sin(x)=C','x')