19# epoh
epoh老师,您好!
我用您的方法进行计算,为什么会提示以下错误:
>> %ARL0=200;
x0=[0.1;1.1];
lb=[0.05;1.0];
ub=[0.2;1.3];
[x,fval]=fmincon(@(x)opt(x,ARL0),x0,[],[],[],[],lb,ub)
??? Error: "opt" is not the name of a function nor a variable,
but is used in an anonymous function either at the prompt or in the argument of EVAL.
>> ARL0=1000;
x0=[0.1;1.8];
lb=[0.05;1.7];
ub=[0.2;1.9];
[x,fval]=fmincon(@(x)opt(x,ARL0),x0,[],[],[],[],lb,ub)
??? Error: "opt" is not the name of a function nor a variable,
but is used in an anonymous function either at the prompt or in the argument of EVAL.
>> ARL0=1000;
x0=[0.1;1.8];
lb=[0.05;1.7];
ub=[0.2;1.9];
[x,fval]=fmincon(@(x)opt(x,ARL0),x0,[],[],[],[],lb,ub)
??? Error: "opt" is not the name of a function nor a variable,
but is used in an anonymous function either at the prompt or in the argument of EVAL.
>> %ARL0=200;
x0=[0.1;1.1];
lb=[0.05;1.0];
ub=[0.2;1.3];
[x,fval]=fmincon(@(x)optif(x,ARL0),x0,[],[],[],[],lb,ub)
Warning: Large-scale (trust region) method does not currently solve this type of problem,
switching to medium-scale (line search).
> In fmincon at 260
非常感谢!