早教吧 育儿知识 作业答案 考试题库 百科 知识分享

请帮我用matlab优化一个方程求d最小值d=x-(x*x-40-6*a*x)^(0.5)a在0.2到0.3之间,x在10到20之间

题目详情
请帮我用matlab优化一个方程
求d最小值
d=x-(x*x-40-6*a*x)^(0.5)
a在0.2 到0.3之间 ,x在10到20之间
▼优质解答
答案和解析
X = fmincon(@(x)x(1)-(x(1)*x(1)-40-6*x(2)*x(1))^(0.5),[11;0.25],[],[],[],[],[10 0.2],[20 0.3])
Warning:Trust-region-reflective method does not currently solve this type of problem,
using active-set (line search) instead.
> In fmincon at 439
Local minimum found that satisfies the constraints.
Optimization completed because the objective function is non-decreasing in
feasible directions,to within the default value of the function tolerance,
and constraints were satisfied to within the default value of the constraint tolerance.
Active inequalities (to within options.TolCon = 1e-006):
lower upper ineqlin ineqnonlin
2 1
X =
20.0000
0.2000