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

Home » Public Forums » archive » *replicate* but with arrays
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
*replicate* but with arrays [message #26620] Mon, 10 September 2001 14:54
aqueous0123 is currently offline  aqueous0123
Messages: 11
Registered: September 2001
Junior Member
If I have array a[3,50] and array b[3], how do I fill all rows of a
with the row vector b? For example, what I want to do is

a = intarr(3,50)
b = [6,5,4]
a[0:2,*] = b ;or a[*,*] = b

a should now look like

[6,5,4]
[6,5,4]
[6,5,4]
[6,5,4]
...

I thought I could use replicate or makearray, like..
a = REPLICATE(b, n_elements(b), 50)
or
a = MAKE_ARRAY(n_elements(b), 50, /INTEGER, VALUE= b)

not a chance. Thank you
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: unloading a dlm...
Next Topic: Re: *replicate* but with arrays

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

Current Time: Sun Oct 12 05:32:20 PDT 2025

Total time taken to generate the page: 3.52045 seconds