MATLAB: Fmincon

fmincon

For a constrained nonlinear multivariable function f(x) subject to the constraints as follows: c(x)≤0; ceq(x)=0; A·x≤b; Aeq·x=beq; lb≤x≤ub The object function and nonlinear function can have other parameters besides x.And when call fmincon just use the function handle @ respectively,for example,x = fmincon(@(x)myfun(x,m,n),x0,A,b,Aeq,beq,lb,ub,@(a,b)mycon(a,b));
I want to learn if Aeq can also have other parameters such as p,q ,The name of the .m file is myAeq for example and call fmincon like this x = fmincon(myfun,x0,A,b,@(p,q)myAeq(p,q),beq,lb,ub,@mycon);

Best Answer

No. fmincon() says that A, b, Aeq, and beq must be matrices. Function handles are not allowed for them. Only the objective function and the nonlinear constraint function can be function handles.