MathGroup Archive 2010

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

Search the Archive

Re: Very very basic question about Mathematica expressions


Hi,

I am a newbie.

For your question, if you check the PLOT function,
Plot[f,{X,Subscript[X, min],Subscript[X, max]}]

the f has to be a function of X, while in your case,
s=x+h,

s is NOT a function of x.

If you use
s[x_,h_]:=x+h;
Manipulate[ Plot[s[x,h], {x, 0, h}], {h, 0.1, 1}]
It would work the way you want.

best,
yp

 On Jul 20, 3:42 am, Sam Takoy <sam.ta... at yahoo.com> wrote:
> Hi,
>
> I find that I don't understand a very basic thing about the building
> blocks of Mathematica.
>
> When the first command is
>
> s = x + h
>
> I figured that (string?) "s" represents (string?) "x+h".
>
> This theory pans out when one tries
>
> s^2
>
> or
>
> D[s, x]
>
> or
>
> Integrate[s, {x, 0, h}]
>
> and
>
> s /. h -> 1
>
> But then by doesn't this work:
>
> Manipulate[ Plot[s, {x, 0, h}], {h, 0.1, 1}]
>
> Many thanks in advance!



  • Prev by Date: Re: A Question About Directive
  • Next by Date: Re: Very very basic question about Mathematica expressions
  • Previous by thread: Re: Very very basic question about Mathematica expressions
  • Next by thread: Re: Very very basic question about Mathematica expressions