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


Groups > comp.soft-sys.math.mathematica > #6509 > unrolled thread

x and y plot finding maximum

Started byflorian <flott32@hotmail.com>
First post2011-11-18 11:22 +0000
Last post2011-11-19 11:56 +0000
Articles 4 — 4 participants

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  x and y plot finding maximum florian <flott32@hotmail.com> - 2011-11-18 11:22 +0000
    Re: x and y plot finding maximum "Oleksandr Rasputinov" <oleksandr_rasputinov@hmamail.com> - 2011-11-18 12:50 +0000
    Re: x and y plot finding maximum "Dr. Wolfgang Hintze" <weh@snafu.de> - 2011-11-18 12:53 +0000
    Integrating a rotated function inbetween two circles "Dr. Peter Klamser" <klamser@googlemail.com> - 2011-11-19 11:56 +0000

#6509 — x and y plot finding maximum

Fromflorian <flott32@hotmail.com>
Date2011-11-18 11:22 +0000
Subjectx and y plot finding maximum
Message-ID<ja5f65$6a7$1@smc.vnet.net>
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!!!

[toc] | [next] | [standalone]


#6512

From"Oleksandr Rasputinov" <oleksandr_rasputinov@hmamail.com>
Date2011-11-18 12:50 +0000
Message-ID<ja5kaj$7os$1@smc.vnet.net>
In reply to#6509
On Fri, 18 Nov 2011 11:22:45 -0000, 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!!!
>

In[1] :=
lista = RandomInteger[{1, 10}, {5, 2}]

Out[1] =
{{8, 3}, {9, 6}, {8, 3}, {2, 8}, {7, 4}}

In[2] :=
{maxx, maxy} = Max /@ Transpose[lista]

Out[2] =
{9, 8}

[toc] | [prev] | [next] | [standalone]


#6517

From"Dr. Wolfgang Hintze" <weh@snafu.de>
Date2011-11-18 12:53 +0000
Message-ID<ja5kfc$7q7$1@smc.vnet.net>
In reply to#6509
"florian" <flott32@hotmail.com> schrieb im Newsbeitrag 
news:ja5f65$6a7$1@smc.vnet.net...
> 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!!!
>

You could use Transpose to get the lists of x- and y-coordinates, each 
in one list, and then find min and max;
like this

lst = Array[{Random[], Random[]} & , 10];
t = Transpose[lst];
(Max[#1] & ) /@ t
(Min[#1] & ) /@ t
Out[128]=
{0.8925679798969234, 0.9646159435193661}
Out[129]=
{0.2203449244291362, 0.21003593197684423}

Regards,
Wolfgang 

[toc] | [prev] | [next] | [standalone]


#6543 — Integrating a rotated function inbetween two circles

From"Dr. Peter Klamser" <klamser@googlemail.com>
Date2011-11-19 11:56 +0000
SubjectIntegrating a rotated function inbetween two circles
Message-ID<ja85hc$im1$1@smc.vnet.net>
In reply to#6509
Hi,

when you execute the following code you get a rotated parabolic function 
a x^2 rotated around the centre of coordinate system:

becher =.
becher[a_, x_] = a x^2;
rot = RotationTransform[(\[Theta]), {0, 0}] // FullSimplify
bechergedreht =.
bechergedreht[\[Theta]_, a_, r_, x_] = rot[{(x), becher[a, x - r]}]
x$fuer$r[a_, b_,
r_] = (x /. Solve[becher[a, x - r]^2 + x^2 == (r + b)^2, x])[[2]] //
Simplify;
ParametricPlot[
Table[bechergedreht[2 \[Pi] i/10, 1, 3, x], {i, 0, 9}], {x, 3,
x$fuer$r[1, 2, 3]}, PlotRange -> 1.01 {{-5, 5}, {-5, 5}},
Epilog -> {Circle[{0, 0}, 3], Circle[{0, 0}, 5]}]
{xstrich, ystrich} = bechergedreht[\[Theta], a, r, x];
loesungx = x /. Solve[xstrich == xs, x] // TrigFactor;
bechergedreht$xstrich[\[Theta]_, a_, r_, xs_] =
ystrich /. x -> loesungx // FullSimplify;
Print["Mit n wird für Table die Anzahl der Schritte festgelegt."]
Print["Mit n = 4 bekomme ich das erwartete Ergebnis."]
n = 4;
Plot[Table[
bechergedreht$xstrich[2 \[Pi] i/10, 1, 3, x], {i, 1, n}], {x, -4,
4}, AspectRatio -> 1, Epilog -> {Circle[{0, 0}, 3]},
PlotRange -> 1.01 {{-5, 5}, {-5, 5}}]
Print["Mit n = 5 bekomme ich keinen Plot mehr."]
n = 5;
Plot[Table[
bechergedreht$xstrich[2 \[Pi] i/10, 1, 3, x], {i, 1, n}], {x, -4,
4}, AspectRatio -> 1, Epilog -> {Circle[{0, 0}, 3]},
PlotRange -> 1.01 {{-5, 5}, {-5, 5}}]

If you fill water into the cups on the right side you get a water wheel.

How do I manage the rotated function most efficiently, that is the well 
known pair of functions regrading to the rotation vector?

As you see I developed the function bechergedreht$xstrich, solving the 
x´(x) part of the rotating function to x(x´) and inserting this into the 
y´(x) part of the rotation vector. But this does not handle to well.

How can I calculate the surface oft the cups on the right side?

Kind regards

Peter

[toc] | [prev] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web