function ret = finv(x)

global X;
X = x;
ret = fzero(@f,[0,pi/2]);





function ret = f(theta)
global X;
ret = sin(theta)*sin(theta)/cos(theta) - X;