Code covered by the BSD License  

Highlights from
mex interface for bound constrained optimization via ASA

mex interface for bound constrained optimization via ASA

by

 

22 Mar 2012 (Updated )

ASA solves bound constrained problems; the user provides routines to calculate the function and grad

asa_grad(x,varargin)
function g = asa_grad(x,varargin)
% gradient function for the problem defined in driver1.c for ASA v2.2

for i = 1:length(x)
    t = sqrt(i);
    g(i) = exp( x(i) ) - t;
end

if nargin > 1
    opts = varargin{1};
    % Use this to pass in extra information
%     disp(opts)
end

Contact us