Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

This question already has an answer here:

How to convert the expression '{a->a0, b->b0}' to the expression 'a=a0; b=b0'? I think this is a common question and do not know if someone has asked it before. Any help or suggestion will be appreiated!

share|improve this question

marked as duplicate by rm -rf Jan 2 at 3:30

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
@Nasser Thanks! I update the question. –  Eden Harder Jan 2 at 2:40
    
It think this is arguably a duplicate of: mathematica.stackexchange.com/q/6669/121 -- if this question is closed I will delete my answer below. –  Mr.Wizard Jan 2 at 3:10
    
@Mr.Wizard You're welcome :D :D –  rm -rf Jan 2 at 3:30
    
You can Apply Set at level one: Set @@@ {a -> a0, b -> b0} –  Mr.Wizard Jan 2 at 5:53

1 Answer 1

up vote 1 down vote accepted

If you do

r = {a -> a0, b -> b0}
r /. Rule -> Set

Then now a and b will be set automatically

Mathematica graphics

You will not see the a=a0, since this is done on the fly, and M will assign a to a0.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.