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

Home » Public Forums » archive » Re: Weird MIN behavior
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: Weird MIN behavior [message #42746 is a reply to message #42745] Sun, 20 February 2005 14:28 Go to previous message
David G. Grier is currently offline  David G. Grier
Messages: 8
Registered: September 1997
Junior Member
Hi There,

Michael Wallace wrote:

> Can someone explain this?

[snip]

> Abnormal case; why doesn't this work?
>
> IDL> a = [1.0, 2.0, 3.0, 4.0, 5.0]
> IDL> r = dblarr(2)
> IDL> r[0] = min(a, MAX = r[1])
> % MIN: Expression must be named variable in this context: <DOUBLE ((
> 0.00000, 0.00000))>.

The error message says it all: r[1] is an element of an array
rather than a variable. Here's a version that works:

IDL> r[0] = min(a, MAX = b)
IDL> r[1] = b

TTFN,

David
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: widget_base alignment question
Next Topic: Maximze a minimize GUI

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

Current Time: Sun Oct 12 14:45:26 PDT 2025

Total time taken to generate the page: 2.13845 seconds