MathGroup Archive 2000

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

Search the Archive

Re: Plots with Variable Limits?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg24150] Re: [mg24100] Plots with Variable Limits?
  • From: BobHanlon at aol.com
  • Date: Wed, 28 Jun 2000 02:12:03 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

In a message dated 6/27/2000 1:01:41 AM, siegman at stanford.edu writes:

>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.
>

With[{a = 10}, Plot[ f[x, a], {x, -2a, 2a} ]  ];

Block[{a = 10}, Plot[ f[x, a], {x, -2a, 2a} ] ];

Module[{a = 10}, Plot[ f[x, a], {x, -2a, 2a} ] ];


Bob Hanlon


  • Prev by Date: Need to reduce 2 lists so that only {x,y} pairs with same x remain
  • Next by Date: AIX 4.3 Mathematica MathKernel Out of Memory
  • Previous by thread: Re: Plots with Variable Limits?
  • Next by thread: Re: Plots with Variable Limits?