Re: Plots with Variable Limits?
- To: mathgroup at smc.vnet.net
- Subject: [mg24112] Re: Plots with Variable Limits?
- From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
- Date: Wed, 28 Jun 2000 02:11:37 -0400 (EDT)
- Organization: Universitaet Leipzig
- References: <8j9djn$51e@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Hi,
Plot[] has the hold all attribute. And
Plot[ f[r,a], {x,-2a,2a} ] /. a->10
will evaluate
Plot[ f[r,a], {x,-2a,2a} ]
ans see that it can't draw the it because a is unknown.
Than it replaces a with 10 and can draw it, so the plot
is gernerated. You must preven the first evaluation with
ReleaseHold @ (Hold[Plot[f[r, a], Evaluate[{r, -2a, 2a}]]] /. a -> 10)
and all works fine.
Regards
Jens
"A. E. Siegman" wrote:
>
> I want to make a test plot of a function f[x,a] versus x for some
> trial value of the parameter a without fixing that parameter for
> subsequent cells, e.g. something like
>
> Plot[ f[r,a], {x,-2a,2a} ] /. a->10
>
> If I try this, Mathematica gives me a "Plot::plln" error -- but then
> goes ahead and makes the correct plot anyway.
>
> I can of course turn off the error -- but what's a better, but still
> clean and simple, way to accomplish this.
>
> Thanks siegman at stanford.edu