Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2004
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2004

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

Search the Archive

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?
> 


  • Prev by Date: Long function defintions
  • Next by Date: Re: If-statement problems
  • Previous by thread: Re: Re: If-statement problems
  • Next by thread: Re: If-statement problems