MathGroup Archive 2005

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

Search the Archive

Re: Can't assign value to symbols

  • To: mathgroup at
  • Subject: [mg58503] Re: Can't assign value to symbols
  • From: Peter Pein <petsie at>
  • Date: Tue, 5 Jul 2005 01:57:43 -0400 (EDT)
  • References: <da5jcd$243$> <> <daalgc$5u5$>
  • Sender: owner-wri-mathgroup at

stephen layland schrieb:
> and thus spake Peter Pein [2005.07.03 @ 04:08]:
>>Lee Newman schrieb:
>>>Thanks for the solutions.  I'm running with David Park's solution, but 
>>>now realize there is one additional problem.  Once I've executed the 
>>>statement  MapThread[(#1 = #2) & , {parameters[[1]], parameters[[3]]}] , 
>>>because I've specified the first row of "parameters" as symbols, this 
>>>row now loses the symbol names and takes on the assigned values, such 
>>>that my attempt to execute the MapThread Statement again for a different 
>>>set of values, e.g. parameters[[2]], fails.
> [ ... ]
>>use Clear to clear the assigned values:
> As others have already suggested, this is a situation where
> Mathematica's *Rule Replacements* shine.  Instead of setting and
> clearing variables, it would be more efficient to apply diffierent
> rules.

> There are at least Aleph0 different ways to do things, but functional
> and rule based approaches will almost always be the most efficient
> in Mathematica.
> Happy hacking.
> --
> /*------------------------------*\
> |        stephen layland         |
> |    Documentation Programmer    |
> | |
> \*------------------------------*/

Thanks Stephen,

you might have noticed my first posting in this thread (Message-Id:
<da5i8s$1q3$1 at>). Generally I prefer functionally/rule-based
style. _Lee_ has chosen David's approach ( MapThread[(#1 = #2) & ,
{parameters[[1]], parameters[[3]]}] ). I just answered his question
regarding assignments to the variables.


Peter Pein

  • Prev by Date: Re: a question about the UnitStep function
  • Next by Date: Re: Re: how to find n in expression x^n using a pattern?
  • Previous by thread: Re: Re: Can't assign value to symbols
  • Next by thread: Re: Re: Re: Can't assign value to symbols