Passing a function output to both objective function and nonlcon in fmincon

1 view (last 30 days)
I am solving the optimisation of a function: f(y(x),x) with the non-linear constraint: g(y(x),x) with resect to u. Written in MATLAB as something like:
fmincon(@(x)(f(y(x),x)),x0,[],[],[],[],xlb,xub,@(x)deal(g(y(x),x),[]))
Is there any way to calculate y once per iteration? (without using globals)

Answers (0)

Tags

Products


Release

R2018a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!