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: [mg49648] Re: If-statement problems
  • From: Bill Rowe <readnewsciv at earthlink.net>
  • Date: Mon, 26 Jul 2004 04:01:52 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

On 7/25/04 at 2:55 AM, aaronfude at yahoo.com (Aaron Fude) wrote:

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

A = {a, b, c, d}; 
A = ReplacePart[A, e, 1]

{e, b, c, d}
--
To reply via email subtract one hundred and four


  • Prev by Date: Re: If-statement problems
  • Next by Date: Q: extract all k-tuple from a list of n elements
  • Previous by thread: Re: If-statement problems
  • Next by thread: simple problem with Map?!?