Code covered by the BSD License  

Highlights from
OpenOpt

image thumbnail

OpenOpt

by

 

25 Nov 2006 (Updated )

nonSmoothSolve (similar to fsolve), non-smooth & noisy local + some global solvers; works in Octave

lin2nonlinC(x, prob)
function c = lin2nonlinC(x, prob)
c = [];
if ~isempty(prob.lin2nonlin.c)
    c = prob.lin2nonlin.c(x, prob);
end
if ~isempty(prob.lin2nonlin.b)
    try
        J = size(c,1);
        for j = 1:size(x,2)
            c(J+1:J+length(prob.lin2nonlin.b),j) = max(prob.lin2nonlin.A * x(:, j) - prob.lin2nonlin.b, 0);
        end
    catch
        keyboard
    end
end
c = c(:);

Contact us