Path: news.mathworks.com!not-for-mail
From: "Steven Lord" <slord@mathworks.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: lu() returns permutations of the rows of L?
Date: Tue, 23 Sep 2008 10:12:36 -0400
Organization: The MathWorks, Inc.
Lines: 19
Message-ID: <gbatgk$r2a$1@fred.mathworks.com>
References: <gb92pc$lhl$1@fred.mathworks.com>
Reply-To: "Steven Lord" <slord@mathworks.com>
NNTP-Posting-Host: lords.dhcp.mathworks.com
X-Trace: fred.mathworks.com 1222179157 27722 144.212.105.187 (23 Sep 2008 14:12:37 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 23 Sep 2008 14:12:37 +0000 (UTC)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
Xref: news.mathworks.com comp.soft-sys.matlab:491543



"David Doria" <daviddoria@gmail.com> wrote in message 
news:gb92pc$lhl$1@fred.mathworks.com...
> Is there any way to have lu(A) give the actual lower triangular matrix L 
> back? It seems silly to me to have to rearrange it?

As Walter said, call LU with three or more output arguments.  To clarify: 
when you call it with two outputs, you receive a '"psychologically lower 
triangular matrix" (i.e. a product of lower triangular and permutation 
matrices)' as the first output.  The three-output form returns the two 
matrices that you would have to multiply to get that psychologically lower 
triangulat matrix as the first (the lower triangular matrix) and third (the 
permutation matrix) outputs.

-- 
Steve Lord
slord@mathworks.com