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

Home » Public Forums » archive » Avoiding FOR loops (version googleplex.infinity)
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Avoiding FOR loops (version googleplex.infinity) [message #59696] Mon, 07 April 2008 05:42 Go to previous message
Gaurav is currently offline  Gaurav
Messages: 50
Registered: January 2007
Member
Dear all,

I know IDL provides us with neat tricks to avoid the processor monster
called FOR loop but I always tend to become incapable using the magic
tricks viz WHERE when I need them the most. Will someone please show
me the way here.

What I have is a 2D Byte array. For each element I need to find the
number of elements in a surrounding 5 X 5 window that is equal to the
element under scrutiny. It is easy to achieve this using FOR loops and
EXTRAC & WHERE functions, but it obviously becomes very slow for large
arrays.

How do I avoid the FOR loop in this case using wildcards and the ":"
operator?

Like always, I hope I do not get to gnaw at my fingernails for long.

Cheers
Gaurav
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: cryptic error message from "plot"
Next Topic: how to display shape file in a windows

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

Current Time: Sat Oct 11 06:38:25 PDT 2025

Total time taken to generate the page: 2.31662 seconds