Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #6528

Re: x and y plot finding maximum

From DrMajorBob <btreat1@austin.rr.com>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: x and y plot finding maximum
Date 2011-11-19 11:48 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <ja8531$ihq$1@smc.vnet.net> (permalink)
References <201111181121.GAA06431@smc.vnet.net>

Show all headers | View raw


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@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@yahoo.com

Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread


Thread

Re: x and y plot finding maximum DrMajorBob <btreat1@austin.rr.com> - 2011-11-19 11:48 +0000

csiph-web