comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: lower and upper triangular matrices
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: lower and upper triangular matrices [message #84365] Thu, 30 May 2013 03:56
fd_luni is currently offline  fd_luni
Messages: 66
Registered: January 2013
Member
Exactly, this is what I want.
Re: lower and upper triangular matrices [message #84366 is a reply to message #84365] Thu, 30 May 2013 03:51 Go to previous message
Mats Löfdahl is currently offline  Mats Löfdahl
Messages: 263
Registered: January 2012
Senior Member
Den torsdagen den 30:e maj 2013 kl. 12:05:16 UTC+2 skrev fd_...@mail.com:
> On Thursday, 30 May 2013 02:33:48 UTC+1, Craig Markwardt wrote:
>
>> What do you mean? Do you want to factor a matrix, such as with CHOLDC? Or do you just want to extract the upper and lower triangle elements from a matrix?
>
> I need the upper and lower triangle elements from a matrix. I am trying to use the Gauss-Seidel method.

Like this?

IDL> n=4
IDL> a=indgen(n,n)+1
IDL> ii=indgen(n) # replicate(1,n)
IDL> jj=indgen(n) ## replicate(1,n)
IDL> print,a
1 2 3 4
5 6 7 8
9 10 11 12
13 14 15 16
IDL> print,a*(ii lt jj)
0 0 0 0
5 0 0 0
9 10 0 0
13 14 15 0
IDL> print,a*(ii ge jj)
1 2 3 4
0 6 7 8
0 0 11 12
0 0 0 16
Re: lower and upper triangular matrices [message #84367 is a reply to message #84366] Thu, 30 May 2013 03:05 Go to previous message
fd_luni is currently offline  fd_luni
Messages: 66
Registered: January 2013
Member
On Thursday, 30 May 2013 02:33:48 UTC+1, Craig Markwardt wrote:
> What do you mean? Do you want to factor a matrix, such as with CHOLDC? Or do you just want to extract the upper and lower triangle elements from a matrix?

I need the upper and lower triangle elements from a matrix. I am trying to use the Gauss-Seidel method.
Re: lower and upper triangular matrices [message #84370 is a reply to message #84367] Wed, 29 May 2013 18:33 Go to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
On Wednesday, May 29, 2013 9:31:35 AM UTC-4, fd_...@mail.com wrote:
>
> Does anyone know how to create the lower and upper trianglular matrices of a given matrix A?

What do you mean? Do you want to factor a matrix, such as with CHOLDC? Or do you just want to extract the upper and lower triangle elements from a matrix?

CM
Re: lower and upper triangular matrices [message #84737 is a reply to message #84366] Thu, 30 May 2013 03:55 Go to previous message
fd_luni is currently offline  fd_luni
Messages: 66
Registered: January 2013
Member
Exactly, this is what I want.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Contour plot-Closed Polygon Intersection?
Next Topic: Widget_Base KBRD_Focus_Events not generated via Alt-Tab

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 15:14:14 PDT 2025

Total time taken to generate the page: 0.00574 seconds