[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: lu decomposition without any permutations
From: |
David Bateman |
Subject: |
Re: lu decomposition without any permutations |
Date: |
Thu, 14 Feb 2008 11:04:41 +0100 |
User-agent: |
Thunderbird 2.0.0.6 (X11/20070914) |
Kamaraju S Kusumanchi wrote:
> Consider
>
> octave:25> a = [1 2; 3 5]
> a =
>
> 1 2
> 3 5
>
> octave:26> [l, u, p] = lu(a)
> l =
>
> 1.000000000000000 0.000000000000000
> 0.333333333333333 1.000000000000000
>
> u =
>
> 3.000000000000000 5.000000000000000
> 0.000000000000000 0.333333333333333
>
> p =
>
> 0 1
> 1 0
>
>
> Here the decomposition corresponds to p*a (which is what is needed in most
> of the cases). However, I am wondering if it would be possible to perform
> an lu decomposition in octave without any permutation of rows? The exact
> reason why I want to do this is kind of complicated. But would appreciate
> if someone can give me a hint.
>
>
The underlying lapack routine xGETRF doesn't allow an LU factorization
to be performed without pivoting, and so with the existing Octave lu
function this is not possible.. That being said, its fairly easy to
write an LU decomposition yourself; search for "Crout" or "Gauss Jordan"
and you'll find the algorithms and maybe even some simple code (ie about
50 lines) to do it.. Note that the stability of the decomposition will
be severely impacted by the fact that you don't allow pivoting..
D.
--
David Bateman address@hidden
Motorola Labs - Paris +33 1 69 35 48 04 (Ph)
Parc Les Algorithmes, Commune de St Aubin +33 6 72 01 06 33 (Mob)
91193 Gif-Sur-Yvette FRANCE +33 1 69 35 77 01 (Fax)
The information contained in this communication has been classified as:
[x] General Business Information
[ ] Motorola Internal Use Only
[ ] Motorola Confidential Proprietary