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

Home » Public Forums » archive » Re: Loop breaks IDL
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: Loop breaks IDL [message #62096 is a reply to message #62094] Fri, 22 August 2008 23:47 Go to previous messageGo to previous message
Chris[6] is currently offline  Chris[6]
Messages: 84
Registered: July 2008
Member
try this

ind_e=where(array[1,*] eq 2, count)
if count eq 0 then tl_small=0 else begin
ext=array[*,ind_e]
ext_test=where(ext[2,*] lt 2*x1, ct)
if ct eq 0 then tl_small=0 else tl_small=total(ext[2,ext_test]^3)
endelse

or, more compactly,

tl_small=total(array[2,*]^3*((array[1,*] eq 2) and (array[2,*] lt
2*x1)))


chris
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Shape file to EVF file Programatically ...
Next Topic: FOR loops removal

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

Current Time: Sun Oct 12 02:39:31 PDT 2025

Total time taken to generate the page: 2.32613 seconds