Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #1271 > unrolled thread
| Started by | Peter Pein <petsie@dordos.net> |
|---|---|
| First post | 2011-03-30 09:13 +0000 |
| Last post | 2011-03-30 09:13 +0000 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.soft-sys.math.mathematica
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Using Nearest on a group of points Peter Pein <petsie@dordos.net> - 2011-03-30 09:13 +0000
| From | Peter Pein <petsie@dordos.net> |
|---|---|
| Date | 2011-03-30 09:13 +0000 |
| Subject | Re: Using Nearest on a group of points |
| Message-ID | <imus8b$i4e$1@smc.vnet.net> |
Am 29.03.2011 13:55, schrieb Martin Vavpotič:
> 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...@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
>
>
Oh dear, it's not too obvious:
you use j as (integer) index. Take care that j takes only integer values:
Manipulate[......,{j,1,187,1}]
should do.
Cheers,
Peter
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web