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 #45372 is a reply to message #31266] Sun, 04 September 2005 12:11 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
RPF writes:

> me...
> If I have a = [2 3] and i wish to repeat these two elements for say 1000
> times so my final array is 2000 elements long is there a quick way?

You want to read the Dimensional Juggling Tutorial:

http://www.dfanning.com/documents/tips.html#Tutorials

Try this:

a = [2, 3]
b = Reform(Rebin(a, 2, 1000), 2000)


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

Probably. There always is. But the exactly method eludes me at
the moment. :-)

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
[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: Thu Oct 16 08:10:23 PDT 2025

Total time taken to generate the page: 0.06690 seconds