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

Home » Public Forums » archive » Array juggling help needed
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Array juggling help needed [message #45686] Fri, 23 September 2005 05:30 Go to previous message
Haje Korth is currently offline  Haje Korth
Messages: 651
Registered: May 1997
Senior Member
Good morning,
I need to expand and an array non-uniformly based on its content. I am
trying to to the following:

input array: [1,5,4,1]
output array should be: [1,0.2,0.2,0.2,0.2,0.2,0.25,0.25,0.25,0.25,1]

Each elements of the input array is basically tuned into
fltarr(inputarray[i])/inputarray[i] and the subarray concatenated. Is there
a way to do this in one step, without using "for" loops and array
concatenation? If not, I can work around this, but knowing for sure that
this doesn't work would at least allow me to stop thinking about this
problem. :-)

To me this looks kind of like a "REPLICATE" for vectors function?

Thanks for your input in advance,
Haje
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Concatenate arrays of different dimensions
Next Topic: Aspect ratio(s) in iTools

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

Current Time: Wed Oct 08 18:19:54 PDT 2025

Total time taken to generate the page: 0.00233 seconds