Re: silly problem
- To: mathgroup at smc.vnet.net
- Subject: [mg85319] Re: silly problem
- From: Grischika at mail.ru
- Date: Tue, 5 Feb 2008 19:48:49 -0500 (EST)
- References: <fo9g1h$sbm$1@smc.vnet.net>
On 5 =C6=C5=D7, 13:07, "Francis Bitonti" <frankb.m... at gmail.com> wrote: > I'm new to Mathematica so this is a very basic question I think. but one > that has me hung up. I keep getting this error > > Set::write: Tag List in {0,0,0,0,0,0,0,0}[1] is Protected. >> > > my code looks like this. > > *IN:* > For[i = 1, i < 6 , i++, > =9APrint[ > =9A g = i; > =9A k[g] = twoDcalc[e1, a1, nodes[[{edges[[g, 1]], edges[[g, 2]]}]]] > =9A ]] > > * > OUT: > **Set::write: Tag List in {0,0,0,0,0,0,0,0}[1] is Protected. >> > *{{3.26002*10^7,7.60672*10^7,-3.26002*10^7,-7.60672*10^7},{7.60672*10^\ > 7,1.7749*10^8,-7.60672*10^7,-1.7749*10^8},{-3.26002*10^7,-7.60672*10^\ > 7,3.26002*10^7,7.60672*10^7},{-7.60672*10^7,-1.7749*10^8,7.60672*10^7,\ > 1.7749*10^8}}* > > Set::write: Tag List in {0,0,0,0,0,0,0,0}[2] is Protected. >> > *{{1.7749*10^8,7.60672*10^7,-1.7749*10^8,-7.60672*10^7},{7.60672*10^7,\ > 3.26002*10^7,-7.60672*10^7,-3.26002*10^7},{-1.7749*10^8,-7.60672*10^7,\ > 1.7749*10^8,7.60672*10^7},{-7.60672*10^7,-3.26002*10^7,7.60672*10^7,3.\ > 26002*10^7}} > > *Set::write: Tag List in {0,0,0,0,0,0,0,0}[3] is Protected. >> > General::stop: Further output of Set::write will be suppressed during \ > this calculation. >> > *{{1.88562*10^8,-1.88562*10^8,-1.88562*10^8,1.88562*10^8},{-1.88562*10^\ > 8,1.88562*10^8,1.88562*10^8,-1.88562*10^8},{-1.88562*10^8,1.88562*10^\ > 8,1.88562*10^8,-1.88562*10^8},{1.88562*10^8,-1.88562*10^8,-1.88562*10^\ > 8,1.88562*10^8}}* > * Hello! May be k is a List but you use it like function. You should write k[[g]] instead of k[g]. k[[g]] - means g element of list k, but k[g] - means function k(g) best regards