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

Home » Public Forums » archive » Please help
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: please help [message #51230 is a reply to message #5448] Sat, 04 November 2006 10:59 Go to previous messageGo to previous message
Jean H. is currently offline  Jean H.
Messages: 472
Registered: July 2006
Senior Member
creon wrote:
> Thanks for your replies. yeah you're right the j++ is in the if
> block already. i've wrote it wrong in the message, sorry for that. the
> code is like that:
>
> j=0
> for i=0,20 do begin
> if (data.field08[i]='V') then begin
> dataV.time[j]=data.field10[i]
> dataV.object[j]=data.field07[i]
> dataV.count[j]=data.field09[i]
> dataV.filter[j]=data.field08[i]
> j++
> endif
> endfor
>
> Maybe i should explain better. i have some observation data with
> time, object, filter and count in each column. the structure called
> data carries those.There are three diffrent filters U,B, and V. now i
> want to pick the data in V filter and write it to the structure dataV.
> i am new to idl programming so that loop is what i could find to do
> this task. is there any other way to do this? or am i doing something
> wrong?
>

You could also use the where() function...

goodIndices = where(data.field08 eq 'V')
dataV.time = data.field10[goodIndices]

Jean
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: IDL Segmentation Fault
Next Topic: data removal from array

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

Current Time: Sat Oct 11 07:03:25 PDT 2025

Total time taken to generate the page: 1.31731 seconds