MATLAB: Optimal way to parse parameters (fmincon).

fminconParallel Computing Toolbox

Hi there,
My question is very straightforward: for a function that depends on multiple parameters, say f(a,b,c), what is the optimal way to parse the fixed parameters (in this example "b" and "c") when calling fmincon.
However, in my experiments using "global" actually improved performance slightly.
To give you a background, I ran several Monte Carlo experiments (10MM) where each run calls fmincon once. Thus, even a slight performance improvement might reduce the computational time substantially.
Thanks,

Best Answer

I honestly don't think we can KNOW the truly optimal way. It may easily depend on release, since TMW can change things at their whim, and they are not going to worry about how a change in perhaps the parser might impact something subtle like this.
It will SURELY depend on the exact implementation of how you pass the variables. Again, subtle differences might make subtle changes in the time.
I'd suggest you run the test, and pick the way that is fastest for you, on your problem.
Related Question