MathGroup Archive 2001

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Greatest element in list

  • To: mathgroup at smc.vnet.net
  • Subject: [mg30499] Re: Greatest element in list
  • From: "Allan Hayes" <hay at haystack.demon.co.uk>
  • Date: Fri, 24 Aug 2001 04:05:58 -0400 (EDT)
  • References: <9m27in$gqd$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Oliver,

There some brackets missing.
Please try

Position[#,Max[#]]&[list]

Position[#,Max[#],{1},1]&[list]
Will give the first position of the maximum.

If this doesn't work please post examples.

--
Allan
---------------------
Allan Hayes
Mathematica Training and Consulting
Leicester UK
www.haystack.demon.co.uk
hay at haystack.demon.co.uk
Voice: +44 (0)116 271 4198
Fax: +44 (0)870 164 0565

"Oliver Friedrich" <oliver.friedrich at tz-mikroelektronik.de> wrote in message
news:9m27in$gqd$1 at smc.vnet.net...
> Hi,
>
> what's the best way to get the position of the greatest number in list of
> reals? I've tried
>
> Position[#,Max[#]]&list
>
> but surprisingly, it doesn't work all the time, sometimes it returns an
> empty list. How is that, because a theorem says that a non empty set of
real
> numbers must have at least one biggest element. So Max[#] can't be empty.
>
> Any solutions ?
>
> Oliver Friedrich
>
>




  • Prev by Date: Re: combining Log[] terms
  • Next by Date: RE: Greatest element in list
  • Previous by thread: Re: Greatest element in list
  • Next by thread: RE: Greatest element in list