How do I call a function for optimization that includes variables I'm not interested in?

1 view (last 30 days)
I am a new user of Matlab. I want to minimize a function. However, I know that if a function is to be minimized it has to accept a vector and return a scalar. The function I want to minimize is:
[xout varxout gradout vargradout report] = ...
gek(xi,y,erry*ones(size(y)),grad,errgr*ones(size(grad)),xiout,options);
I am only interested in minimizing xout with respect to xiout. i.e xout = f(xiout).
How can I do this?
Ps. I have access to the optimization toolbox.
Thanks in advance

Answers (1)

Matt J
Matt J on 14 Dec 2014

Community Treasure Hunt

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

Start Hunting!