MATLAB: Solving system of 2 triangular equations

system of triangular equations

when i tried to solve the system of equation using the solve function, i had this result that i did not understand:
clear all
clc
syms x y
S=solve(5*cos(x)+3*cos(x+y)==13.5,5*sin(x)-3*sin(x+y)==6.0,x,y)
but results are like the following:
x: [2x1 sym]
y: [2x1 sym]
S.x
ans =
2*atan((528769^(1/2)*i)/1477 + 240/1477)
2*atan(240/1477 - (528769^(1/2)*i)/1477)
>> S.y
ans =
-2*atan(1215/2888 - (528769^(1/2)*i)/2888)
-2*atan((528769^(1/2)*i)/2888 + 1215/2888)
my question is how to retrieve my real x and y? thank you

Best Answer

x = double(S.x)
y = double(S.y)