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

Home » Public Forums » archive » Re: Efficient Programming
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: Efficient Programming [message #4615] Sun, 02 July 1995 00:00 Go to previous message
Leonard Kramer is currently offline  Leonard Kramer
Messages: 2
Registered: July 1995
Junior Member
dean@phobos.cira.colostate.edu wrote:
>
> What would be the most efficient way to get this to work in IDL. This is
> obvious slow with the FOR DO BEGIN.....
>
>
> Kelly Dean
> CSU/CIRA
>
> ============================================================ ===============
>
> nx = 1024
> ny = 768
> North_bound = 3429
> West_bound = 9249
> line_res = 4
> elem_res = 8
> LINarr = LONarr(nx*ny)
> PIXarr = LONarr(nx*ny)
> k = 0L
> * FOR y = 0, ny-1 DO BEGIN
> * FOR x = 0, nx-1 DO BEGIN
> * LINarr(k) = North_bound + ( y * line_res)
> * PIXarr(k) = West_bound + ( x * elem_res)
> * k = k + 1L
> * ENDFOR
> * ENDFOR
>

You see those lines I marked with an * above. Replace them
with:
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: Efficient Programming (This post finally worked)
Next Topic: Efficient Programming

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

Current Time: Wed Oct 08 15:34:01 PDT 2025

Total time taken to generate the page: 0.00466 seconds