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

Home » Public Forums » archive » Concatenating arrays across chosen dimension
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Concatenating arrays [message #45366 is a reply to message #31266] Mon, 05 September 2005 07:08 Go to previous messageGo to previous message
K. Bowman is currently offline  K. Bowman
Messages: 330
Registered: May 2000
Senior Member
In article <431af10e@quokka.wn.com.au>, "RPF" <RPF@lol.com> wrote:

> Also is there an easy way to
> make an upper triangular matrix i.e. make all entries below the diagonal
> zero ?

IDL> n = 5
IDL> i = REBIN(LINDGEN(n), n, n)
IDL> j = REBIN(TRANSPOSE(LINDGEN(n)), n, n)
IDL> print, i
0 1 2 3 4
0 1 2 3 4
0 1 2 3 4
0 1 2 3 4
0 1 2 3 4
IDL> print, j
0 0 0 0 0
1 1 1 1 1
2 2 2 2 2
3 3 3 3 3
4 4 4 4 4
IDL> a = (i GE j)
IDL> print, a
1 1 1 1 1
0 1 1 1 1
0 0 1 1 1
0 0 0 1 1
0 0 0 0 1


Cheers, Ken Bowman
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: constraining parameters in multi-Gaussian 1D fitting
Next Topic: Re: constraining parameters in multi-Gaussian 1D fitting

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

Current Time: Mon Oct 27 02:53:55 PDT 2025

Total time taken to generate the page: 3.12054 seconds