MathGroup Archive 2007

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

Search the Archive

Re: beginner plot function with parameter

  • To: mathgroup at smc.vnet.net
  • Subject: [mg74051] Re: beginner plot function with parameter
  • From: "Jean-Marc Gulliet" <jeanmarc.gulliet at gmail.com>
  • Date: Thu, 8 Mar 2007 04:29:07 -0500 (EST)
  • References: <esjg3c$269$1@smc.vnet.net> <45ED5F5A.4060703@gmail.com>

Wei Li wrote:
> Dear Mathgroup,
>
> I am using mathematica 5 to plot a function with some parameter, I want to
> plot for example a simple parabolic function with positive parameter s:
>
> f[z_]:=(z/s)^2;
> Plot[f[z],{z,-s,s}];
>
> mathematica code doesn't seem to work, anyone can help?

Hi Wei,

Try something like the following:

f[s_][z_] := (z/s)^2;
With[{s = 2}, Plot[f[s][z], {z, -s, s}]; ]

Regards,
Jean-Marc


  • Prev by Date: Re: "Transparency" with respect to differentiation
  • Next by Date: Re: How can I automate this problem in a mathematica notebook?
  • Previous by thread: Re: beginner plot function with parameter
  • Next by thread: Re: beginner plot function with parameter