Path: news.mathworks.com!newsfeed-00.mathworks.com!panix!newsfeed.stanford.edu!sn-xt-sjc-03!sn-xt-sjc-09!sn-post-sjc-01!supernews.com!news.supernews.com!not-for-mail
From: Randy Yates <yates@ieee.org>
Newsgroups: comp.soft-sys.matlab,comp.dsp
Subject: Is a QR Decomposition Better than B \ A?
Date: Fri, 13 Jul 2007 00:24:04 -0400
Organization: The Universal Church of Christ
Message-ID: <m3zm21orrv.fsf@ieee.org>
User-Agent: Gnus/5.1007 (Gnus v5.10.7) XEmacs/21.4.20 (linux)
Cancel-Lock: sha1:hrbbi4Vi3JOL5VvhQBSoMnqEjGs=
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Complaints-To: abuse@supernews.com
Lines: 33
Xref: news.mathworks.com comp.soft-sys.matlab:418870 comp.dsp:225376



If we have a system of equations Ax=b, then we can solve it using

  x = A \ b 

or 

  x = pinv(A'*A)*A'*b

or

  [Q,R] = qr(A);
  x = inv(R)*Q'*b;

Which is best? 

Also, I thought a QR decomposition always produced a nonsingular R
matrix [meyer, p.313], but Matlab is returning a non-square
matrix. Why?

--Randy

@BOOK{meyer,
  title = "{Matrix Analysis and Applied Linear Algebra}",
  author = "{Carl~D.~Meyer}",
  publisher = "Society for Industrial and Applied Mathematics",
  year = "2000"}

-- 
%  Randy Yates                  % "The dreamer, the unwoken fool - 
%% Fuquay-Varina, NC            %  in dreams, no pain will kiss the brow..."
%%% 919-577-9882                %  
%%%% <yates@ieee.org>           % 'Eldorado Overture', *Eldorado*, ELO
http://home.earthlink.net/~yatescr