Re: Plots with Variable Limits?
- To: mathgroup at smc.vnet.net
- Subject: [mg24135] Re: [mg24100] Plots with Variable Limits?
- From: Matt.Johnson at autolivasp.com
- Date: Wed, 28 Jun 2000 02:11:52 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
Try:
Plot[ f[ x, 10 ], {x, -20, 20}];
This doesn't assign a value to a and will not give you an error message. Also,
either r should be x, or x should be r in your example.
If your bounds are always -2 a and 2 a, then
a=10;
Plot[ f[ x, a ], { x, -2 a , 2 a }];
Clear[a];
will work.
-matt
"A. E. Siegman" <siegman at stanford.edu> on 06/26/2000 10:51:55 PM
Subject: [mg24135] [mg24100] Plots with Variable Limits?
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