MATLAB Answers


getting fmincon error after a call

Asked by seldeeno on 24 Apr 2013


What is wrong with this call to fmincon:

[temppop,tempval,exitflag,output] = fmincon(@myfun,pop(idx(i),:),[],[],[],[],XRmin(1,:),XRmax(1,:),@mycon,opts,varargin{:});

I am getting this error: Error using myfun Too many input arguments.

Where myfun is:

function f = myfun(x),
    [f, c, ceq] = mlbsuite(x, 38, 0, 'g16');
    f = - f; %


Log in to comment.


No products are associated with this question.

0 Answers

Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!