MATLAB: How can i find this value x at the below expression

solve equation in function

invx=tan(x*pi/180.0)-(x*pi/180.0);
for example if invx== 0.0149
note : Result is 20 degree.
x=?

Best Answer

Using the fzero function:
invx = @(x) tan(x*pi/180.0)-(x*pi/180.0);
x = fzero(@(x) invx(x) - 0.0149, 1)
producing:
x =
19.9981037612328