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

Home » Public Forums » archive » Re: *replicate* but with arrays
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: *replicate* but with arrays [message #26619 is a reply to message #26618] Mon, 10 September 2001 15:15 Go to previous message
Mark Hadfield is currently offline  Mark Hadfield
Messages: 783
Registered: May 1995
Senior Member
Check out JD Smith's Dimension Juggling Tutorial & Array Concatenation
Tutorial, posted to this group in April or May this year. The following
Google links *might* take you there

http://groups.google.com/groups?as_umsgid=3AC7B345.1648F0A9% 40astro.cornell.
edu

http://groups.google.com/groups?q=Array+Concatenation+Tutori al&hl=en&group=c
omp.lang.idl-pvwave&safe=off&rnum=1&selm=3AEF1FA 7.4ECBFB6%40astro.cornell.ed
u

But to cut a long story short, my preferred way to do what you want is

b = [6,5,4]
a = rebin(b,n_elements(b),50)

Here rebin is trying to expand the second dimension of b to 50. Since b
doesn't have a second dimension it creates one with size 1, then fills it by
replication.

---
Mark Hadfield
m.hadfield@niwa.cri.nz http://katipo.niwa.cri.nz/~hadfield
National Institute for Water and Atmospheric Research



--
Posted from clam.niwa.cri.nz [202.36.29.1]
via Mailgate.ORG Server - http://www.Mailgate.ORG
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: *replicate* but with arrays
Next Topic: compiling before needing

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

Current Time: Tue Dec 02 02:55:51 PST 2025

Total time taken to generate the page: 0.55572 seconds