comparison scripts/optimization/fminunc.m @ 10549:95c3e38098bf

Untabify .m scripts
author Rik <code@nomad.inbox5.com>
date Fri, 23 Apr 2010 11:28:50 -0700
parents 5c66978f3fdf
children a8ce6bdecce5
comparison
equal deleted inserted replaced
10548:479536c5bb10 10549:95c3e38098bf
388 s = (s / sn) ./ d; 388 s = (s / sn) ./ d;
389 ## Get the line minimizer in s direction. 389 ## Get the line minimizer in s direction.
390 tn = norm (r*s); 390 tn = norm (r*s);
391 snm = (sn / tn) / tn; 391 snm = (sn / tn) / tn;
392 if (snm < delta) 392 if (snm < delta)
393 ## Get the dogleg path minimizer. 393 ## Get the dogleg path minimizer.
394 bn = norm (b); 394 bn = norm (b);
395 dxn = delta/xn; snmd = snm/delta; 395 dxn = delta/xn; snmd = snm/delta;
396 t = (bn/sn) * (bn/xn) * snmd; 396 t = (bn/sn) * (bn/xn) * snmd;
397 t -= dxn * snmd^2 - sqrt ((t-dxn)^2 + (1-dxn^2)*(1-snmd^2)); 397 t -= dxn * snmd^2 - sqrt ((t-dxn)^2 + (1-dxn^2)*(1-snmd^2));
398 alpha = dxn*(1-snmd^2) / t; 398 alpha = dxn*(1-snmd^2) / t;