MathGroup Archive 1999

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

Search the Archive

Re: Dont Understand

  • To: mathgroup at
  • Subject: [mg15953] Re: Dont Understand
  • From: "Seth Chandler" <SChandler at>
  • Date: Wed, 17 Feb 1999 23:34:13 -0500
  • Organization: University of Houston
  • References: <7a2bm8$>
  • Sender: owner-wri-mathgroup at

The problem is that you haven't reset s to be s/.{0->-1}. If your function
were as follows, I think you would get the behavior you desire:


Seth J. Chandler
Associate Professor of Law
University of Houston Law Center

Don McKenzie Paul wrote in message <7a2bm8$1ts at>...
>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/.{0->-1};
>                    Partition[s,n]
>                    ]
>                    {s=Table[Random[Integer],{n n}]},
>                    s/.{0->-1}
>                    ]
>Prof. Don McKenzie Paul               tel.  (1203) 523603 Department of
>Physics                 fax.  (1203) 692016 University of Warwick
>email  phrje at COVENTRY CV4 7AL

  • Prev by Date: Outgoing wave boundary conditions with NDSolve
  • Next by Date: HELP: Plot[]ing composite functions
  • Previous by thread: Re: Dont Understand
  • Next by thread: Re: Dont Understand