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

Home » Public Forums » archive » Re: sorting of a multi-dimensional array in only one "direction"/dimension
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: sorting of a multi-dimensional array in only one "direction"/dimension [message #41910 is a reply to message #41906] Thu, 02 December 2004 08:50 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Timm Weitkamp writes:

> There may be better ways, but this here does the job without a loop
> (assuming you have IDL 5.6 or higher):
>
> tot = TOTAL(imgs, 3)
> min = MIN(imgs, DIMENSION=3)
> max = MAX(imgs, DIMENSION=3)
> avg = (tot - min - max) / 3.0

This reminds me...

I'm making notes for a 3nd Edition of my book.
(Don't hold your breath, the outline is grandiose,
so who knows if it will really happen. IDL has gotten
so BIG!) One of my proposed chapters is "The IDL Way:
Writing Code to Confuse Your Boss and Amaze Your Friends".
This is the kind of material I'd like to have in there,
not so much to be instructive, but to give people an
idea of how these kinds of problems are solved.

I've saved these kinds of nuggets over the years,
but I can use more. Does anyone have a good story
to tell of how code that took days to run and pages
to write ran in seconds with five lines of IDL code?
(After consulting the IDL newsgroup, of course.)

I'd offer a prize, but I'm not drinking coffee or
beer anymore after returning from Germany. I am
completely disillusioned with what passes for both
in America. :-(

Cheers,

David

P.S. Any you can throw in bread, too. :-)
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: IDL and Intel's 64-bit Xeon processor
Next Topic: Re: IDL and Intel's 64-bit Xeon processor

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

Current Time: Fri Oct 10 20:15:22 PDT 2025

Total time taken to generate the page: 0.32177 seconds