Matlab example of simulated annealing algorithm