Date: Dec 4, 2012 3:05 AM
Author: Frank
Subject: passing constraint parameters

Hello, I want to pass extra parameters to constraint functions using fmincon.

K = 1;
nonlin = @(x) fcon(x, K);

My code is
y = fmincon(@(x)myfun5(x,t), x0, [], [], [], [], zeros(Lt^2+1, 1), [], nonlin, options);

But an error occurs:

Too many output arguments.
Caused by:
Failure in initial user-supplied nonlinear constraint function evaluation. FMINCON cannot continue.

Can anyone help?

Thanks.