MathGroup Archive 2010

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

Search the Archive

Re: What does & mean?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg107059] Re: What does & mean?
  • From: Noqsi <jpd at noqsi.com>
  • Date: Tue, 2 Feb 2010 03:24:34 -0500 (EST)
  • References: <hk6d22$m61$1@smc.vnet.net>

On Feb 1, 4:14 am, Michael Knudsen <micknud... at gmail.com> wrote:
> Hi,
>
> I have recently bought Mathematica, and I have a really tough time
> getting started. I'm reading the various documents found under
> "Complete Documentation" at the Mathematica homepage, but it doesn't
> feel like the right place to start.
>
> For example, I'm now trying to solve some simple differential
> equations, and the documentation provides the following example:
>
> A = {{4, -6}, {1,-1}};
>
> X[t_] = {x[t], y[t]};
> system = MapThread[#1 == #2 &, {X'[t], A.X[t]}];
>
> sol = DSolve[system, {x,y}, t]
>
> However, there is no explanation of how & works here (and it isn't in
> the MapThread documentation either). Where should one start reading in
> order to understand basic constructs like this? This particular
> example is really nasty, since & is generally ignored by search
> engines.

It's shorthand for Function. When trying to decode an unfamiliar
construct like this, FullForm is useful:

FullForm[#1 == #2 &]
Function[Equal[Slot[1],Slot[2]]]

Now you know how to get Mathematica to explicitly "spell out" an
expression. That's useful in other ways, too, because FullForm is the
definitive representation.


  • Prev by Date: Re: Dynamic plot + real data set
  • Next by Date: Re: What does & mean?
  • Previous by thread: Re: What does & mean?
  • Next by thread: Re: Re: What does & mean?