help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: LU decomposition/backsubstitution


From: Michael Hanke
Subject: RE: LU decomposition/backsubstitution
Date: Mon, 6 Dec 1999 12:33:50 +0100

On Mon, 06 Dec 1999, Ted Harding wrote:
Surely setting
>
>  B = A\U
>
>where U is an identity matrix of appropriate dimensions, would give
>you what you are looking for (to within rounding errors, anyway):
>
>  B*b = A\U*b = A\b
>
>Ted.
Hi,

I have the same problem sometimes. Your proposed solution does not seem to be
optimal. B is simply the inverse matrix, and the complexity is O(n^3). The
problem appears if one has to solve a number m << n (=size(A)) systems wher m
is not known in advance. One could use the LU decomposition [L,U]=lu(A), and
then x=U\(L\b). This works efficiently if octave sees that L and U are
triangular (at least after permutation). Does octave see this? According to the
documentation, matlab does.

Regards,
Michael

-- 
+---------------------------------------------------------------+
|  Michael Hanke                Royal Institute of Technology   |
|                               NADA                            |
|                               S-10044 Stockholm               |
|                               Sweden                          |
+---------------------------------------------------------------+
|  Visiting address:            Lindstedtsvaegen 3              |
|  Phone:                       + (46) (8) 790 6278             |
|  Fax:                         + (46) (8) 790 0930             |
|  Email:                       address@hidden               |
|                               address@hidden       |
+---------------------------------------------------------------+



-----------------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.che.wisc.edu/octave/octave.html
How to fund new projects:  http://www.che.wisc.edu/octave/funding.html
Subscription information:  http://www.che.wisc.edu/octave/archive.html
-----------------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]