% Sample file for solving two test problems with an sqp solver

% Specify problem file

prob = 'ex512';      

% Initialize x

x = [ 0 0 ]';

% Initialize lambda

lambda = [ 1 1 ]';

% Solve problem

[x,lambda,f,gradf,g,A,HessL] = sqp(prob,x,lambda)

% Specify problem file

prob = 'hexagon';      

% Initialize x

x = rand(9,1); % Please make better initial estimate

% Initialize lambda

lambda = rand(24,1); % Please make better initial estimate

% Solve problem

[x,lambda,f,gradf,g,A,HessL] = sqp(prob,x,lambda)
