Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2009

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

Search the Archive

Re: Maximum in a list

  • To: mathgroup at smc.vnet.net
  • Subject: [mg97229] Re: Maximum in a list
  • From: Szabolcs <szhorvat at gmail.com>
  • Date: Mon, 9 Mar 2009 01:01:30 -0500 (EST)
  • References: <gp07ul$l0o$1@smc.vnet.net>

On Mar 8, 12:51 pm, pacot... at orange.fr (pacotomi) wrote:
> Hi,
>  Suppose a list
>
> mylist={{1,2},{3,4},{8,3}}
>
> I would like to extract the element {i,j} of mylist for which j is max
> (here, it is the second one {3,4}).
>

Part[mylist, First@Ordering[mylist[[All, 2]], -1]]


  • Prev by Date: Re: Version 7.0.1 bug with initial Palette positions
  • Next by Date: Starting Mathematica without GUI
  • Previous by thread: Re: Maximum in a list
  • Next by thread: Re: Maximum in a list