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

Home » Public Forums » archive » Re: should max nuke the 2nd argument
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: should max nuke the 2nd argument [message #65726 is a reply to message #65724] Mon, 23 March 2009 07:54 Go to previous messageGo to previous message
liamgumley is currently offline  liamgumley
Messages: 74
Registered: June 2005
Member
On Mar 23, 9:41 am, Greg Hennessy <greg.henne...@cox.net> wrote:
> The following weird thing is happening to me. Does it happen to
> others?
>
> IDL> n=2l^15
> IDL> id=indgen(30000)
> IDL> nel=size(id,/n_elements)
> IDL> help,n,nel  
> N               LONG      =        32768
> NEL             LONG      =        30000
> IDL> n=min(n,nel)
> IDL> help,n,nel  
> N               LONG      =        32768
> NEL             LONG      =            0
> IDL>
>
> I don't think that the nel variable should be reset
> to zero after the call to min, but its early enough
> in the morning I'd like a 2nd opinon before I try
> to report this as a bug.

MIN is doing exactly what it is supposed to do.

From the online help:

"The MIN function returns the value of the smallest element of Array.
The type of the result is the same as that of Array.

Syntax
Result = MIN( Array [, Min_Subscript] [, /ABSOLUTE] [,
DIMENSION=value] [, MAX=variable] [, /NAN] [,
SUBSCRIPT_MAX=variable])

Return Value: Returns the smallest array element value.

Arguments
Array: The array to be searched.
Min_Subscript: A named variable that, if supplied, is converted to a
long integer containing the one-dimensional subscript of the minimum
element. Otherwise, the system variable !C is set to the one-
dimensional subscript of the minimum element."

Cheers,
Liam.
Practical IDL Programming
http://www.gumley.com/
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: starting point of dashed lines
Next Topic: Google Groups and ENVI 4.6.1

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

Current Time: Sun Oct 12 04:46:26 PDT 2025

Total time taken to generate the page: 0.95962 seconds