Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2001
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2001

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

Search the Archive

RE: Greatest element in list

  • To: mathgroup at smc.vnet.net
  • Subject: [mg30493] RE: [mg30474] Greatest element in list
  • From: "Wolf, Hartmut" <Hartmut.Wolf at t-systems.de>
  • Date: Fri, 24 Aug 2001 04:05:52 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

Hello Oliver,

as to the theorem you stated, I don't believe it. However, if you have in
your list e.g. an undefined symbol or something where numerical comparison
doesn't work, then you'll come to surprise.

In[1]:= list = Table[Random[Real, {0, 100}], {100}]; 
In[2]:=
(Position[#1, Max[#1]] & )[list = Append[list, "wake up"]]
Out[2]= {}

;-) Hartmut


> -----Original Message-----
> From: Oliver Friedrich [mailto:oliver.friedrich at tz-mikroelektronik.de]
To: mathgroup at smc.vnet.net
> Sent: Thursday, August 23, 2001 8:16 AM
> To: mathgroup at smc.vnet.net
> Subject: [mg30493] [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 real
> numbers must have at least one biggest element. So Max[#] 
> can't be empty.
> 
> Any solutions ?
> 
> Oliver Friedrich
> 
> 



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