Re: x and y plot finding maximum
- To: mathgroup at smc.vnet.net
- Subject: [mg122974] Re: x and y plot finding maximum
- From: DrMajorBob <btreat1 at austin.rr.com>
- Date: Sat, 19 Nov 2011 06:45:16 -0500 (EST)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- References: <201111181121.GAA06431@smc.vnet.net>
- Reply-to: drmajorbob at yahoo.com
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
- References:
- x and y plot finding maximum
- From: florian <flott32@hotmail.com>
- x and y plot finding maximum