Re: Re: Locator question
- To: mathgroup at smc.vnet.net
- Subject: [mg79346] Re: [mg79306] Re: Locator question
- From: DrMajorBob <drmajorbob at bigfoot.com>
- Date: Wed, 25 Jul 2007 02:08:00 -0400 (EDT)
- References: <12974590.1185274453715.JavaMail.root@m35>
- Reply-to: drmajorbob at bigfoot.com
It works at my machine. It doesn't stay on the curve while I'm moving it, but when i release it, it immediately pops to the correct point on the curve. Bobby On Tue, 24 Jul 2007 05:03:36 -0500, Mike <mjp.1 at comcast.net> wrote: > Bob, > > You posted: > > Manipulate[ > Show[ > Plot[g[x], {x, 0, 2 \[Pi]}], > p[[2]] = g@p[[1]]; slope = D[g[x], x] /. x -> p[[1]]; > Plot[p[[2]] + slope (x - p[[1]]), {x, 0, 2 \[Pi]}], > PlotLabel -> > Style["slope of f(x)= " <> > ToString[NumberForm[slope, {6, 4}]]]], {{g, Sin, > "function"}, {Sin -> TraditionalForm[Sin[x]], > Cos -> TraditionalForm[Cos[x]], #^2 & -> TraditionalForm[x^2]}, > ControlType -> PopupMenu}, {{p, {0, 0}}, Locator}] > > Which tracks the line representing the slope at the point and ties it to > the selected graph. Now...if I could get that darn locator to work! > > Thanks, > > Mike > > -- DrMajorBob at bigfoot.com