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

Home » Public Forums » archive » Re: help with sorting vector elements in to subarrays
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: help with sorting vector elements in to subarrays [message #80217] Tue, 22 May 2012 05:27 Go to previous message
greg.addr is currently offline  greg.addr
Messages: 160
Registered: May 2007
Senior Member
If you know these line groups in advance, and you just want to label the groups, you could use something like:

zz = [5,6,9,10,11]

n_groups=2
group=[0,0,1,1,1]

for i=0,n_groups-1 do begin
q=where(group eq i)

...some operation on zz[q]...
endfor

If you don't know in advance, maybe you can create this group vector out of your amp array. If amp is a float representing amplitude, I can't see how you'd do that, but I'm just guessing what you have.

Greg
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: VM Save File Problem
Next Topic: Re: help with mathematics

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

Current Time: Wed Oct 08 15:10:16 PDT 2025

Total time taken to generate the page: 0.00574 seconds