[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: LU Factorizations
From: |
Fumihiro CHIBA |
Subject: |
Re: LU Factorizations |
Date: |
Thu, 13 Mar 2003 00:35:34 +0900 |
Hello. I found the following description in
http://www.netlib.org/lapack/double/dgetrf.f
* DGETRF computes an LU factorization of a general M-by-N matrix A
* using partial pivoting with row interchanges.
*
* The factorization has the form
* A = P * L * U
* where P is a permutation matrix, L is lower triangular with unit
* diagonal elements (lower trapezoidal if m > n), and U is upper
* triangular (upper trapezoidal if m < n).
On 2003.3.12, at 10:36 Asia/Tokyo, Nick Allen wrote:
I have a question about using Octave to determine an LU matrix
factorization. Straight out of the manual for the "lu" function I run:
[l, u, p] = lu (a)
l =
1.00000 0.00000
0.33333 1.00000
u =
3.00000 4.00000
0.00000 0.66667
p =
0 1
1 0
but if i then do l*u I get:
3 4
1 2
when it should result in the original matrix a, which was:
1 2
3 4
Could someone please explain to me what is going on? Is this a problem
with Octave, or is it a fault in my basic understanding of LU
factorizations? By the way I am running Octave 2.1.36 on an ia32 Linux
platform.
Thanks
Nick
--
_____________________________
Nick Allen <address@hidden>
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------
Fumihiro CHIBA
Tokorozawa, Saitama, Japan
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------
LU Factorizations, Nick Allen, 2003/03/11