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

Home » Public Forums » archive » Re: Using MIN on arrays : Exorcising loops?
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: Using MIN on arrays : Exorcising loops? [message #27054 is a reply to message #27052] Fri, 05 October 2001 09:01 Go to previous messageGo to previous message
Liam E. Gumley is currently offline  Liam E. Gumley
Messages: 378
Registered: January 2000
Senior Member
Dick Jackson wrote:
>
> "Andrew Cool" <cooladjc@chariot.net.au> wrote in message
> news:3BBD96E8.B1329549@chariot.net.au...
>> Hi all,
>>
>> I have three slabs of data [640,500] held as an array [640,500,3].
>>
>> I need to populate another 2D array [640,500] with the minimum
>> value for every x,y coordinate found in the first 3 arrays.
>>
>> [...]
>>
>> There's gotta be a better way, surely? Some syntax variant on MIN?
>
> It sure would be nice if MIN and MAX had a Dimension parameter, just like
> TOTAL has. It would be even nicer if it were coming in 5.5, to be released
> Any Day Now, wouldn't it? Too bad that anyone who would know about this
> would be bound by a non-disclosure agreement. ;-|

In other words, it sure would be nice if IDL could do something like
this:

IDL> a = indgen(2, 5)
IDL> print, a
0 1
2 3
4 5
6 7
8 9
IDL> print, min(a, dim=2)
0 1
IDL> print, min(a, dim=1)
0 2 4 6 8

where the DIM keyword is the dimension number, starting at dimension 1.
Maybe this will be supported by MIN and MAX in the not too distant
future ;-)

While we're on the topic of future releases, here's a bit more
information about multi-threading in IDL 5.5:

http://www.rsinc.com/pr/detail.cfm?PressReleaseID=55

Cheers,
Liam.
Practical IDL Programming
http://www.gumley.com/
[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
Previous Topic: Re: CURSOR question
Next Topic: Re: Possibly O/T: printing IDL code in colour -> CAN DO!!!

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

Current Time: Thu Oct 09 23:13:55 PDT 2025

Total time taken to generate the page: 0.16696 seconds