MathGroup Archive 1999

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

Search the Archive

Re: Dont Understand

  • To: mathgroup at
  • Subject: [mg15936] Re: [mg15857] Dont Understand
  • From: "Tomas Garza" <tgarza at>
  • Date: Wed, 17 Feb 1999 23:34:03 -0500
  • Sender: owner-wri-mathgroup at

Don McKenzie Paul wrote:

>I'm not an expert in Mathematica and would appreciate comments on why
>init1 returns a list with all zeros replaced by -1, but init does not.
>Its probably very simple but its confused me.


                    {s=Table[Random[Integer],{n n}]},

                    {s=Table[Random[Integer],{n n}]},

In init you use a transformation rule on s, but never assign the result to
something. Hence the Partition is applied to the original s. Try something

                    {s=Table[Random[Integer],{n n}]},

However, in init1 you perform the transformation without a semicolon at the
end, hence the result is simply displayed on the screen -- you can do
nothing with it until you assign it to a symbol.

Good luck,

Tomas Garza
Mexico City

  • Prev by Date: Mathematica Training (UK and US)
  • Next by Date: RE: List manipulation question
  • Previous by thread: RE: Dont Understand
  • Next by thread: Re: Dont Understand