MATLAB: Solving trigonometric equation (decoupling)

fsolvesolve

I wanted to solve ϕ as a function of other variables
Is is possible to decouple this equation ?
Even matlab symbolic gave me some kind of log function. I don't understand what that mean actually.
any help is apperciated

Best Answer

How about just defining the function:
phi = @(psi, theta) atan( sin(psi).*sin(theta)./(cos(psi) + cos(theta)) );