forum.alglib.net
http://forum.alglib.net/

bad matrix conditions
http://forum.alglib.net/viewtopic.php?f=2&t=72
Page 1 of 1

Author:  EngineerHRO [ Mon Oct 04, 2010 12:51 pm ]
Post subject:  bad matrix conditions

Hello, I'm trying to solve an equation of the Form A*m = d with A [18 rows, 11 columns], where d is given and m is searched. In order to solve this, the form (A^T * A) ^-1 * A^T * d is used. As my results haven't been sufficient, I checked my calculation in matlab and recognized that Matlab distinguishes between inv(A^T * A) * A^T and (A^T*A) \ A^T. Actually both should lead to the same result...but it is mentioned that using inv(X)*B is more inaccurate in comparison to A\b. By using (A^T*A) \ A^T I got better results, too. Is it possible to "emulate" the calculation of matlab with alglib? Additionally I have to say that I don't know how both ways are realized in matlab.

Thanks and regards,
Peter

Author:  Sergey.Bochkanov [ Mon Oct 04, 2010 1:39 pm ]
Post subject:  Re: bad matrix conditions

Well, it is hard to emulate internals of closed source project - they don't disclose algorithms they used.

If you want to get better precision when solving under/overdetermined linear system, you can use RMatrixSolveLS function from Solvers subpackage. It can solve both underdetermined and overdetermined systems, and it features iterative improvement, which can significantly improve precision of your results.

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/