summaryrefslogtreecommitdiff
path: root/find_min.m
blob: a6962d2339633a4d8e6a3afd441b8712453ce190 (plain)
1
2
3
4
5
6
function [ x_sol, energy ] = find_min( index, lens_placement, fitness_simplified, MaxFunEvals, MaxIter )
%Minimizes energy for given solution
    [x_sol, energy] = fminsearch(fitness_simplified, lens_placement(index,:), optimset('TolFun',1e-5,'MaxFunEvals',MaxFunEvals,'MaxIter', MaxIter));

end