Dont Understand
- To: mathgroup at smc.vnet.net
- Subject: [mg15857] Dont Understand
- From: Don McKenzie Paul <phrje at csv.warwick.ac.uk>
- Date: Fri, 12 Feb 1999 18:40:18 -0500 (EST)
- Organization: University of Warwick
- Sender: owner-wri-mathgroup at wolfram.com
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. Don init[n_Integer]:=Module[ {s=Table[Random[Integer],{n n}]}, s/.{0->-1}; Partition[s,n] ] init1[n_Integer]:=Module[ {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 csv.warwick.ac.uk COVENTRY CV4 7AL UK
- Follow-Ups:
- Re: Dont Understand
- From: Jurgen Tischer <jtischer@col2.telecom.com.co>
- Re: Dont Understand