Re: What does & mean?
- To: mathgroup at smc.vnet.net
- Subject: [mg107074] Re: [mg107050] What does & mean?
- From: cire g <eric.phys at gmail.com>
- Date: Tue, 2 Feb 2010 03:27:20 -0500 (EST)
- References: <201002011114.GAA22737@smc.vnet.net>
I have the same problem and I had been using Mathematica for a while, for example can any one explain the code to color a sum: f[X_List, m_Integer] := Module[{Y}, Y = Partition[X, m]; Z = MapThread[(c = If[OddQ@#2, Red, Blue]; Style[#, c, Bold, 18] & /@ #1) &, {Y, Range@Length@Y}]; Infix[Flatten@Z, Style["+", 18]]]; f[Table[1,{15}],3] of thread [mg107001] in the documentation is not a good explaining the use of @,#, & etc... that make those codes very hard to decipher... bests Michael Knudsen 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. > > Thanks, > Michael Knudsen > > >
- References:
- What does & mean?
- From: Michael Knudsen <micknudsen@gmail.com>
- What does & mean?