Multidimensional minimization (direction-set method). Implements a direction-set (Powell’s) method for multidimensional minimization of a function without calculation of the gradient [1, 2]
y = @(x, s) x(1) ^ 2 + x(2) ^ 2 + s; o = optimset('MaxIter', 100, 'TolFun', 1E-10); s = 1; [x_optim, y_min, conv, iters, nevs] = powell(@(x) y(x, s), [1 0.5], o); %pass y wrapped in an anonymous function so that all other arguments to y, which are held constant, are set %should return something like x_optim = [4E-14 3E-14], y_min = 1, conv = 1, iters = 2, nevs = 24
Package: optim