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

Home » Public Forums » archive » Re: IDL FOR Loop variable increments
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: IDL FOR Loop variable increments [message #62592 is a reply to message #62591] Fri, 19 September 2008 12:07 Go to previous messageGo to previous message
raghuram is currently offline  raghuram
Messages: 32
Registered: February 2008
Member
On Sep 19, 9:53 am, Ed Hyer <ejh...@gmail.com> wrote:
> Raghu,
>
> Not knowing the makeup of NDVI, NDVISLICE, and MASK in your example,
> it's very difficult to determine what you're up to here, but it
> strongly looks to me like some higher-order functions are in order
> here. You are aware that IDL can give you an array MAX(VAR,DIM=N) or
> MIN, TOTAL, or can do any boolean comparison you choose across an
> entire array?
>
> As I said, I don't really know what the outcome of your code should
> be, but even in this economy, I'll bet $5 you can do it with a much
> smaller, more comprehensible set of array operations.
>
> --Edward H.

You are right. I just haven't thought about using array operations
probably because
a working using these loops doesn't take very long to run. From what i
read here,
it looks a FOR loop may not be the best option for such operations.
Maybe i'll
use a while loop and see what happens or i'll rethink how the code can
be
written in a much more efficient manner. I do know that IDL can do
things like
MAx, TOtal etc. But in my case, all i'm trying to do is to assign
values from
one array(ndvislice) to another(ndvi) based on ndvislice's previious
values.
The outcome i'd expect for each output would be a finite value or a
NaN value.
So i assign my output(ndvi) to ndvislice if conditions are met, else
i'll assign
a NaN value( Mask).

Raghu
[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
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: how to countor on YZ-surface
Next Topic: Getting array indices

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

Current Time: Fri Oct 10 11:04:57 PDT 2025

Total time taken to generate the page: 0.96433 seconds