共回答了24个问题采纳率:79.2%
function fun=fun(afa)
m=16;
z=89;
rb=m*z*cos(20*pi/180)/2;
r=150;
fun=(rb*cos(afa)+rb*afa*sin(afa))^2+(r*[cos(10*pi/180)-sin(10*pi/180)*cot(10*pi/180+asin((r*sin(10*pi/180))/(r-rb*sin(afa)+rb*afa*cos(afa)))-10*pi/180)])^2-732*732;
--------------------------------------------------------------------------------------------------------------------------------
>> options=optimset('Display','iter'); % Option to display output
[x,fval] = fsolve(@fun,0.5,options) % Call optimizer
Norm of First-order Trust-region
Iteration Func-count f(x) step optimality radius
0 2 5.64433e+008 1.06e+010 1
1 4 1.59757e+006 0.053029 5.06e+008 1
2 6 20.0135 0.00315702 1.78e+006 1
3 8 3.24683e-009 1.12537e-005 22.7 1
4 10 0 1.43342e-010 0 1
Optimization terminated:first-order optimality is less than options.TolFun.
x =
0.4438
fval =
0
解就是0.4438
1年前
8