MathGroup Archive 2011

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

Search the Archive

Re: Using Nearest on a group of points

  • To: mathgroup at smc.vnet.net
  • Subject: [mg117663] Re: Using Nearest on a group of points
  • From: Martin VavpotiÄ <martin.vavpotic at gmail.com>
  • Date: Tue, 29 Mar 2011 06:56:08 -0500 (EST)
  • References: <im9sk8$g5j$1@smc.vnet.net> <imc952$1ke$1@smc.vnet.net> <imfae8$iue$1@smc.vnet.net>

I did my own version of it and it looks like this:

Manipulate[Block[{spl = ListLinePlot[Final, PlotRange -> {{0, 2}, {1,
6.5}}]},
Show[spl, Graphics[{Red, PointSize[.02], Point[{Final[[j, 1]],
Final[[j, 2]]}]}]]], {j, 1, 187}] (I believe the brackets are fine.)

Final is a 187=D72 Table with x,y values of the graph. The animation
itself works like it should, but a few of the frames turn a red
background and I get these warnings:

Part::pspec: Part specification 89.4` is neither an integer nor a list
of integers. >>

Am I doing something wrong?

Martin

On 24 mar., 12:37, Peter Pein <pet... at dordos.net> wrote:
>
> the dot can be done with:
>
> Manipulate[Block[{spl=Plot[Sin[x],{x,0,2Pi}]},
> Show[spl,Graphics[{Red,PointSize[.02],Point[{x0,Sin[x0]}]}]]],
> {x0,0,2Pi}]
>
> and I didn't try out, but I guess the Animation should depend on x0 too
> and reside inside the Show[].
>
> Peter



  • Prev by Date: Exploratory graph theory with Mathematica 8
  • Next by Date: mathematica for large-scale computing problems for normal users
  • Previous by thread: Re: Using Nearest on a group of points
  • Next by thread: Re: Using Nearest on a group of points