MathGroup Archive 2001

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

Search the Archive

Re: variables versus functions


"Julian Sweet" <jsweet at engineering.ucsb.edu> wrote in message
news:9dld6m$o9g at smc.vnet.net...
> How is it different to define a variable such as A=Cos[x]
> versus a function  A[x_]:=Cos[x] ?

In the first case, x must be predefined:

a = Cos[x]

x = Pi

a

In the second, x doesn't have to be defined at all outside the function:

f[x_] := Cos[x]

f[Pi]

--
Paul Lutus
www.arachnoid.com




  • Prev by Date: RE: Exponential Equations
  • Next by Date: Re: Exponential Equations
  • Previous by thread: variables versus functions
  • Next by thread: Re: variables versus functions