MathGroup Archive 2011

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

Search the Archive

Re: x and y plot finding maximum


data = RandomInteger[{0, 100}, {5, 2}]

{{23, 97}, {55, 31}, {52, 17}, {58, 30}, {98, 40}}

{minX, minY} = Min /@ Transpose[data]

{23, 17}

Cases[data, {minX, _}]

{{23, 97}}

Cases[data, {_, minY}]

{{52, 17}}

{maxX, maxY} = Max /@ Transpose[data]

{98, 97}

Cases[data, {maxX, _}]

{{98, 40}}

Cases[data, {_, maxY}]

{{23, 97}}


Bob Hanlon


On Fri, Nov 18, 2011 at 6:21 AM, florian <flott32 at hotmail.com> wrote:
> It seems like a fairly simple job but somehow i cannot find a solution.
>
> I have a list of coordinates lista={{3,2},{4,8},...}
>
> What i would like to do is to find the max/min y and x coordinates.
>
> Help would be really appreciated!! Thanks!!!
>



  • Prev by Date: Re: How to force integers
  • Next by Date: Re: How to force integers
  • Previous by thread: Re: x and y plot finding maximum
  • Next by thread: Re: x and y plot finding maximum