MathGroup Archive 2011

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

Search the Archive

Re: x and y plot finding maximum


lista = RandomInteger[100, {15, 2}]

{{95, 25}, {63, 52}, {82, 59}, {43, 71}, {67, 73}, {79, 0}, {18,
   47}, {16, 24}, {16, 56}, {94, 88}, {92, 47}, {84, 77}, {92,
   82}, {36, 20}, {3, 31}}

{xmin, ymin} = Min /@ Transpose@lista
{xmax, ymax} = Max /@ Transpose@lista

{3, 0}

{95, 88}

or

range[x_List] := x[[Ordering[x][[{1, -1}]]]]
{{xmin, xmax}, {ymin, ymax}} = range /@ Transpose@lista

{{3, 95}, {0, 88}}

Bobby

On Fri, 18 Nov 2011 05:21:59 -0600, 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!!!
>


-- 
DrMajorBob at yahoo.com



  • Prev by Date: Re: Solve equation with summation?
  • Next by Date: Re: Tooltip value for plots with units
  • Previous by thread: Re: x and y plot finding maximum
  • Next by thread: Re: x and y plot finding maximum