I have a function to optimize, say Function, in Matlab. This function depends on variables (say x) over which I want to optimize and one parameter (say, Q) which does not need to be optimized.Hence, the function Function(x,Q). In other words, I have an array of values for Q and want to find optimal x values for each Q. However, I cannot find a way how to pass those Q values when using function handle @Function in optimization function.
So, my question is how to pass those Q values when using function handle in optimization functions, for example fmincon(@Function,x0,A,b)?
fmincon(@Function,x0,Q,A,b)work?