Re: Greatest element in list
- To: mathgroup at smc.vnet.net
- Subject: [mg30487] Re: [mg30474] Greatest element in list
- From: Andrzej Kozlowski <andrzej at tuins.ac.jp>
- Date: Fri, 24 Aug 2001 04:05:48 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
First of all your code is wrong, presumably you meant: Position[#, Max[#]] &@list Secondly, even if you you actually used the correct code you, you should still provide an example showing when it does not work, not just a mere claim that it sometimes does not. Given the amount of information that you have provided the most likely hypothesis seems to me that you did not input what you though you did or that your list was empty to start with. On Thursday, August 23, 2001, at 03:15 PM, Oliver Friedrich wrote: > 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 > > > Andrzej Kozlowski Toyama International University JAPAN http://platon.c.u-tokyo.ac.jp/andrzej/