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

Home » Public Forums » archive » Re: Simple question in IDL, looking for solution, thank you
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: Simple question in IDL, looking for solution, thank you [message #81759 is a reply to message #81758] Mon, 22 October 2012 14:36 Go to previous messageGo to previous message
Danxia is currently offline  Danxia
Messages: 10
Registered: September 2012
Junior Member
Hey Heinz,

Thanks for the reply.

Danxia
On Monday, October 22, 2012 8:01:19 AM UTC-4, Heinz Stege wrote:
> Hi Danxia,
>
>
>
> you didn't ask for a solution without a loop. So here is my simple
>
> answer:
>
>
>
> arr=[5,2,3,1,8,3,1,2,3]
>
> bcg=[1,2,3,2,1,4,2,3,5]
>
> sum=intarr(max(arr)+1)
>
> for i=0,n_elements(bcg)-1 do sum[arr[i]]+=bcg[i]
>
> print,sum[1:*]
>
>
>
> Cheers, Heinz
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How to make text of axis much larger in idl 8?
Next Topic: cgHistoplot and multiplot

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

Current Time: Sat Nov 29 09:59:41 PST 2025

Total time taken to generate the page: 0.48490 seconds