MathGroup Archive 2010

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

Search the Archive

Re: Select Maximum Value

  • To: mathgroup at smc.vnet.net
  • Subject: [mg107921] Re: [mg107891] Select Maximum Value
  • From: Patrick Scheibe <pscheibe at trm.uni-leipzig.de>
  • Date: Tue, 2 Mar 2010 07:56:52 -0500 (EST)
  • References: <201003020836.DAA03985@smc.vnet.net>

Hi,

it is simply

A = {{2, 4, 1, 3, 2, 2}, {4, 7, 9, 1, 2, 4}};

Max /@ A

and your code is not working at all.

Cheers
Patrick

Am Mar 2, 2010 um 9:36 AM schrieb graser:

> Hi
>
> I want to pick up the maximum value of each list  in the Array
>
> A={{2, 4, 1, 3, 2, 2}, {4,7,9,1,2,4}}
>
> I can do it in two steps..
>
> B=Table[Sort[A[[i]], #1>#2&], {i, 1, Length[A]}];
>
> C=Table[B[i], {i, 1, Length[B]}];
>
> But is there any way I can do it in just one step with Select function
> or any thing else?
>
> Thanks
>
>



  • Prev by Date: Re: edge labels
  • Next by Date: Re: edge labels
  • Previous by thread: Select Maximum Value
  • Next by thread: Re: Select Maximum Value