Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*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 2005

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

Search the Archive

Re: What's the matter with this?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg56123] Re: [mg56109] What's the matter with this?
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Sat, 16 Apr 2005 03:51:58 -0400 (EDT)
  • Reply-to: hanlonr at cox.net
  • Sender: owner-wri-mathgroup at wolfram.com

intertemp={{14,17,{0.7929,0.4366},{2.8146,11.3986}}};

intertemp=MapAt[Mod[#,14,1]&, intertemp, {1,2}]

{{14, 3, {0.7929, 0.4366}, {2.8146, 11.3986}}}

or

intertemp={{14,17,{0.7929,0.4366},{2.8146,11.3986}}};

intertemp=ReplacePart[intertemp, Mod[intertemp[[1,2]],14,1], {1,2}]

{{14, 3, {0.7929, 0.4366}, {2.8146, 11.3986}}}


Bob Hanlon

> 
> From: Steve Gray <stevebg at adelphia.net>
To: mathgroup at smc.vnet.net
> Date: 2005/04/15 Fri AM 04:48:29 EDT
> To: mathgroup at smc.vnet.net
> Subject: [mg56123] [mg56109] What's the matter with this?
> 
> I have a list
> 
> intertemp[[1]] = {{14, 17, {0.7929, 0.4366}, {2.8146, 11.3986}}
> 
> and a simple function
> 
> modxx[axx_] := axx[[2]] = Mod[axx[[2]], 14, 1];
> 
> When I do modxx[intertemp[[1]]] I get this:
> 
> Set::setps: {14, 17, {0.792902, <<19>>}, {2.81469, 11.3986}}
> 	 in assignment of part is not a symbol.
> 
> What does this mean and how can I do it correctly?
> I must be making a very simple error.
> I want the 17 to become 3 with no other changes.
> 
> Thank you
> 
> Steve Gray
> 
> 


  • Prev by Date: Re: Why can't I call Random[NormalDistribution[10.0,0.0]]?
  • Next by Date: Assisting FullSimplify
  • Previous by thread: Re: What's the matter with this?
  • Next by thread: Maping and Complex Addition