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

Home » Public Forums » archive » Array Dimensions and WRITE_GIF
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: array dimensions [message #24664 is a reply to message #24589] Mon, 09 April 2001 08:28 Go to previous messageGo to previous message
Alex Schuster is currently offline  Alex Schuster
Messages: 124
Registered: February 1997
Senior Member
"Richard G. French" wrote:

> David is the master of keywords - I've used SIZE all these years without
> knowing that there was a /DIMENSIONS keyword. I guess the only way to
> know about these things is to read through the documentation over and
> over again and take notes on potentially useful keywords and options.

True. And repeat that for every new version of IDL.

> Which brings me to my question - does anyone out there have a favorite
> keyword on a routine that we mere mortals might not know about, but
> which
> might make our lives much easier? Any suggestions welcome, except for
> HISTOGRAM and PLOT!

MIN() has the MAX keyword so you can compute both values in one step.
And it also allows a second parameter (I wonder why they didn't make
that a keyword) to return the (first) position the the minimum:

IDL> x = sin( findgen( 300 ) / 100 ) ; create array
IDL> print, where( x eq max( x ) )
157
; another variant
IDL> tmp = max( x, pos ) & print, pos
157
; and yet another:
IDL> print, !c
157

Alex
--
Alex Schuster Wonko@weird.cologne.de PGP Key available
alex@pet.mpin-koeln.mpg.de
[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
Read Message
Read Message
Previous Topic: Re: A third-party example
Next Topic: Problem with ".cdf" files on Windows

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

Current Time: Wed Oct 08 16:18:02 PDT 2025

Total time taken to generate the page: 0.00197 seconds