Path: news.mathworks.com!not-for-mail From: <HIDDEN> Newsgroups: comp.soft-sys.matlab Subject: Re: solve command Date: Wed, 25 Mar 2009 12:10:04 +0000 (UTC) Organization: Siemens AG Lines: 32 Message-ID: <gqd6us$7m9$1@fred.mathworks.com> References: <2223808.1237973902862.JavaMail.jakarta@nitrogen.mathforum.org> <29391649.1237975774607.JavaMail.jakarta@nitrogen.mathforum.org> <gqd172$fp1$1@fred.mathworks.com> Reply-To: <HIDDEN> NNTP-Posting-Host: webapp-02-blr.mathworks.com Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit X-Trace: fred.mathworks.com 1237983004 7881 172.30.248.37 (25 Mar 2009 12:10:04 GMT) X-Complaints-To: news@mathworks.com NNTP-Posting-Date: Wed, 25 Mar 2009 12:10:04 +0000 (UTC) X-Newsreader: MATLAB Central Newsreader 1681436 Xref: news.mathworks.com comp.soft-sys.matlab:527557 "Bruno Luong" <b.luong@fogale.findmycountry> wrote in message <gqd172$fp1$1@fred.mathworks.com>... > Torsten Hennig <Torsten.Hennig@umsicht.fhg.de> wrote in message <29391649.1237975774607.JavaMail.jakarta@nitrogen.mathforum.org>... > > > > > As I read in the MATLAB documentation, the backslash > > operation does not seem to produce a least-squares > > solution in the case of square systems if the coefficient > > matrix is singular. > > > > Instead, you can try > > x = pinv(A*R)*b > > > > Best wishes > > Torsten. > > Hi Torsen, > > Yes, the backslash actually produces the least-square solution for overdetermined system (minimizing the norm of the residual, on the image space), as with pinv. > > However if the matrix has non-trivial kernel (different {0}), then backslash selects a solution that is usually not the minimum-norm solution (minimize the norm on the source space, but sill least-square solution). This is the main difference between pinv. > > Hope it is clear, > > Bruno Thanks for the clearings. I tried to built the A Matrix in another way. So the new equation is A*x=B. But when I try to solve this problem with x=A\B or x=inv(A)*B, then the results is not quite correct. I guess it must be a rounding error or something like that. Is it possible solve this problem in another way, e.g. an iteration method?? Shane