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 #65724 is a reply to message #65721] Mon, 23 March 2009 08:16 Go to previous messageGo to previous message
Jean H. is currently offline  Jean H.
Messages: 472
Registered: July 2006
Senior Member
Greg Hennessy 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.
>
> IDL Version 6.4 (linux x86_64 m64).

this is normal.

Read the help file for "min". First argument is the array, 2nd contains
the location of the min value in the array... and location 0 is
perfectly valid when the "array" contains only one element!

did you intent to do min([n,nel]) maybe?

Jean
[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: Sat Oct 11 08:43:46 PDT 2025

Total time taken to generate the page: 3.03904 seconds