diff scripts/optimization/fsolve.m @ 8562:a6edd5c23cb5

use replacement methods if qrupdate is not available
author Jaroslav Hajek <highegg@gmail.com>
date Thu, 22 Jan 2009 11:10:47 +0100
parents 1cb63ac13934
children c136d313206a
line wrap: on
line diff
--- a/scripts/optimization/fsolve.m
+++ b/scripts/optimization/fsolve.m
@@ -67,8 +67,6 @@
 
 function [x, fvec, info, output, fjac] = fsolve (fcn, x0, options)
 
-  persistent have_qrupdate = exist ('qrupdate') == 5;
-
   if (nargin < 3)
     options = struct ();
   endif
@@ -268,11 +266,7 @@
       endif
 
       ## Update the QR factorization.
-      if (have_qrupdate)
-        [q, r] = qrupdate (q, r, u, v);
-      else
-        [q, r] = qr (q*r + u*v');
-      endif
+      [q, r] = qrupdate (q, r, u, v);
 
     endwhile
   endwhile