Re: If-statement problems
- To: mathgroup at smc.vnet.net
- Subject: [mg49644] Re: If-statement problems
- From: BobHanlon at aol.com
- Date: Mon, 26 Jul 2004 04:01:49 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
A = {a, b, c, d}; A=ReplacePart[A,e,1]; A {e, b, c, d} Bob Hanlon > In a message dated Sun, 25 Jul 2004 07:14:51 +0000 (UTC), < > aaronfude at yahoo.com> writes: Supose A = {a, b, c, d} and I want to replace the > first element with "e". > Apparently A[[1]] = e will have the effect of assigning e to a and not > leaving "a" alone and setting A to {e, b, c, d}. How would I accomplish the > latter and not the former? >