MathGroup Archive 2001

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

Search the Archive

Re: Greatest element in list

  • To: mathgroup at
  • Subject: [mg30509] Re: [mg30474] Greatest element in list
  • From: Tomas Garza <tgarza01 at>
  • Date: Fri, 24 Aug 2001 04:06:13 -0400 (EDT)
  • References: <>
  • Sender: owner-wri-mathgroup at

Your code can't possibly work. Position requires a pattern (see Help
Browser). You might use something like

Position[lst, x_ /; x == Max[lst]]

Tomas Garza
Mexico City

----- Original Message -----
From: "Oliver Friedrich" <oliver.friedrich at>
To: mathgroup at
Subject: [mg30509] [mg30474] Greatest element in list

> 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
> numbers must have at least one biggest element. So Max[#] can't be empty.
> Any solutions ?
> Oliver Friedrich

  • Prev by Date: Plot Joined Intelligently
  • Next by Date: Re: Greatest element in list
  • Previous by thread: Greatest element in list
  • Next by thread: Re: Greatest element in list