Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Perihelion of Mercury' topicStudent Support Forum > General > Archives > "Perihelion of Mercury"

< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic
Author Comment/Response
Bill Simpson
06/29/13 10:27pm

If "this point" is further away than the "previous point" and further away than the "next point" then this point must be a maximum.

For[i = 2, i < Length[perihelion], i++,
If[
Norm[perihelion[[i]]]>Norm[perihelion[[i-1]]] && Norm[perihelion[[i]]]>Norm[perihelion[[i+1]]], Print[perihelion[[i]]]]
]

{0.387095,0.0475166}

{0.378223,0.0951207}

{0.36352,0.141258}

Watch out if you start or end on a maximum or if you have several adjacent points that are a maximum.

URL: ,

Subject (listing for 'Perihelion of Mercury')
Author Date Posted
Perihelion of Mercury Sean Roubion 06/27/13 4:02pm
Re: Perihelion of Mercury Bill Simpson 06/29/13 10:27pm
Re: Re: Perihelion of Mercury Sean Roubion 07/01/13 01:23am
< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic