MathGroup Archive 2002

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

Search the Archive

Re: Getting symbols out of list returned by solve


On 10/22/02 11:39 PM, in article ap5g7d$4kn$1 at smc.vnet.net, "Sam"
<phry420 at yahoo.com> wrote:

> This may be really simple but I am having trouble setting the
> variables to the values returned by solve.  If
> solution={S0 -> 0,S1 -> 5....}the numbers of S# are subscripts
> I can get to the idivdual parts with
> solution[[1]][[1]] and solution[[1]][[2]] but when I try to set the
> one equal to the other I get this error
> Set::"setps": solution[[1]] in assignment of part is not a symbol."
> What is going on and how can I fix this?

Sam, you're working too hard :)

If you really want permanent assignments, then substitute (Apply) Rule for
Set:

assignments=Set@@@solution

Tom Burton



  • Prev by Date: Problem with user defined functions
  • Next by Date: Re: Custom colors on a 3-d suface
  • Previous by thread: Getting symbols out of list returned by solve
  • Next by thread: Re: Getting symbols out of list returned by solve