MathGroup Archive 2010

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

Search the Archive

Re: Very very basic question about Mathematica expressions

  • To: mathgroup at smc.vnet.net
  • Subject: [mg111127] Re: Very very basic question about Mathematica expressions
  • From: Yanping <genie05 at gmail.com>
  • Date: Wed, 21 Jul 2010 07:13:04 -0400 (EDT)
  • References: <i23k1j$epv$1@smc.vnet.net>

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