From help-octave-request at bevo dot che dot wisc dot edu Wed Dec 17 14:56:02 2003 Subject: Re: Octave QR factorization From: Bart Vandewoestyne To: taltman at lbl dot gov Cc: A S Hodel , help-octave@bevo.che.wisc.edu Date: Wed, 17 Dec 2003 14:53:46 -0600 taltman at lbl dot gov wrote: > > hodela >norm(Q*R - A)/norm(A), which will (typically) be around m*n*1e-15, > hodela >where [m,n] = size(A). > > Yes, this is EXACTLY what I do in my algorithms, where I use iterative > improvement techniques. The key thing is that you need to analyze your > input matrices, and the iterative calculations that you're applying to > them, to come up with a upper-bound for the minimal amount of the > tolerance ( the expression you wrote above ) that will be acceptibly > small. > > And use: > > eps > > to check your install's epsilon, or minimal exact (i.e., > full-precision ) representation of the non-zero difference between two > values. So this is what you mean i should use instead of Q*R==A: if ( norm(my_Q*my_R-A)/norm(A) < eps ) fprintf('Our calculations are correct!\n'); else fprintf('Our calculations are wrong!\n'); end ? Regards, Bart -- Bart Vandewoestyne Bart.Vandewoestyne_at_pandora.be Naamsesteenweg 328 bus 201 GSM: +32 (0)478 397 697 B-3001 Heverlee http://osswin.sourceforge.net ---------------------------------------------------------------------- "Theory is the general; experiments are the soldiers." (Leonardo da Vinci) ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------