I am going to find the optimum values for a subroutine function in MATLAB. the subroutine function is not accessible in a mathematical form and we don't know any thing about it. We have ten input parameters and we find the optimum values for them which minimize the output of the subroutine function.


To be clear, you have a Matlab "black box" function which takes a $10\times 1$ input and generates a function value and you want to find the minimizer. Such optimization problems are hard to solve in the sense that we cannot apply any heuristics or tricks because we don't know anything about the function you are trying to optimize. Moreover, you don't have any gradient information either.

I would start by trying a derivative free method like Nelder-Mead (fminsearch in Matlab). Do you have a box constraint on the 10 variables, i.e. do you know lower and upper limits for each coordinate? If so you can do a grid search. Brute force search in 10 dimensions may be hopeless and take a very long time. Instead you can use coordinate descent i.e. change one coordinate at a time to the next grid value and step in a direction that reduces the function value.

You can also try other heuristic global optimization routines such as genetic algorithm, simulated annealing and particle swarm optimization. If you have access to Matlab's global optimization toolbox, you can try their "Optimization app" graphical interface to quickly test some of these out.

  • $\begingroup$ I also was thinking about generic algorithm, PSO and this kind of optimizations. $\endgroup$ – MimSaad Jul 5 '17 at 20:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.