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 #80298 is a reply to message #80217] Wed, 23 May 2012 08:35 Go to previous messageGo to previous message
Tito is currently offline  Tito
Messages: 16
Registered: March 2012
Junior Member
On Tuesday, May 22, 2012 2:27:58 PM UTC+2, (unknown) wrote:
> 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

Greg I will try it! But yes amp[i] is a float representing amplitude. For now I exclude this blended lines but I will definitely need them later. I will probably make another ugly loop that will handle with that ( I hope) I was just searching for a simple method that might separate this trivial vector to neighboring sub arrays but i guess it is not that easy...
I will write when I get solution. I have something in mind.

Trifon
[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: Sat Oct 11 19:50:15 PDT 2025

Total time taken to generate the page: 0.63951 seconds