Path: news.mathworks.com!not-for-mail
From: "Phil Goddard" <philNOSPAM@goddardconsulting.ca>
Newsgroups: comp.soft-sys.matlab
Subject: Re: What does this syntax mean
Date: Mon, 18 Jan 2010 00:41:03 +0000 (UTC)
Organization: Goddard Consulting
Lines: 19
Message-ID: <hj0amv$420$1@fred.mathworks.com>
References: <hiqlta$25v$1@fred.mathworks.com> <hiqn4j$joj$1@fred.mathworks.com> <hiqnih$h83$1@fred.mathworks.com> <hivnv0$nq5$1@fred.mathworks.com>
Reply-To: "Phil Goddard" <philNOSPAM@goddardconsulting.ca>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1263775263 4160 172.30.248.37 (18 Jan 2010 00:41:03 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 18 Jan 2010 00:41:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 26433
Xref: news.mathworks.com comp.soft-sys.matlab:599503

lu factorizations aren't unique so getting a different result doesn't necessarily mean that either implementation is wrong.

But I would also point out that the L and U that you assert are correct do not reproduce your A.

>> L = [1,0,0;1.5,1,0;1.5,1,1], U = [2,-1,1;0,4.5,7.5;0,0,-4], L*U
L =
    1.0000         0         0
    1.5000    1.0000         0
    1.5000    1.0000    1.0000
U =
    2.0000   -1.0000    1.0000
         0    4.5000    7.5000
         0         0   -4.0000
ans =
     2    -1     1
     3     3     9
     3     3     5

Phil.