gistlib
main.m% Define the objective function function f = objfun(x) f = 100*(x(2) - x(1)^2)^2 + (1 - x(1))^2; end % Initial guess x0 = [2, 3]; % Perform quasi-newton least-squares optimization options = optimset('Display','iter'); [x,fval] = fminunc(@objfun,x0,options); 264 chars12 lines
% Define the objective function function f = objfun(x) f = 100*(x(2) - x(1)^2)^2 + (1 - x(1))^2; end % Initial guess x0 = [2, 3]; % Perform quasi-newton least-squares optimization options = optimset('Display','iter'); [x,fval] = fminunc(@objfun,x0,options);
gistlibby LogSnag