MathGroup Archive 2007

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

Search the Archive

Re: beginner plot function with parameter


Needs["Graphics`"];

f[z_]:=(z/s)^2;

DisplayTogether[
    Table[
      Plot[f[z],{z,-s,s},
        PlotStyle->{Red,Green,Blue}[[s]]],
      {s,1,3}],
    Frame->True,Axes->False,
    FrameLabel->{"z","f[z]"},
    PlotRange->All,ImageSize->400];

Plot3D[f[z],{z,-3,3},{s,10^-6,3},
    PlotPoints->50,
    AxesLabel->{"z","s","f[z]"},
    ClipFill->None,
    PlotRange->{Automatic,Automatic,{0,1}},ImageSize->600];

Plot3D[f[z],{s,10^-6,3},{z,-3,3},
    PlotPoints->50,
    AxesLabel->{"s","z","f[z]"},
    ClipFill->None,
    PlotRange->{Automatic,Automatic,{0,1}},ImageSize->600];


Bob Hanlon

---- Wei Li <wei_li92 at hotmail.com> 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?
> 
> Thanks!
> 
> Wei



  • Prev by Date: Re: Rigid body equations
  • Next by Date: Re: Noob evaluation question
  • Previous by thread: Re: beginner plot function with parameter
  • Next by thread: Mathematica demos