gistlib
main.moptions = optimoptions(@fsolve,'SpecifyObjectiveGradient',true,'CheckGradients',true); options.StepTolerance = 1e-6; options.FunctionTolerance = 1e-6; options.OptimalityTolerance = 1e-6; syms x y F = [x^2 + y^2 - 1; x^2 - y^2]; J = jacobian(F, [x, y]); [x_sol, fval, exitflag] = fsolve(F, [0.5, 0], options); 311 chars11 lines
options = optimoptions(@fsolve,'SpecifyObjectiveGradient',true,'CheckGradients',true); options.StepTolerance = 1e-6; options.FunctionTolerance = 1e-6; options.OptimalityTolerance = 1e-6; syms x y F = [x^2 + y^2 - 1; x^2 - y^2]; J = jacobian(F, [x, y]); [x_sol, fval, exitflag] = fsolve(F, [0.5, 0], options);
gistlibby LogSnag