Message Boards Message Boards

0
|
4012 Views
|
2 Replies
|
2 Total Likes
View groups...
Share
Share this post:
GROUPS:

Convert a substitution rule into an equation

Posted 9 years ago

Dear community,

Newbie here. I would like to convert the results of a solve function into an equation; that is, go from this: {a-> b/3}, to this: a==b/3. It seems that conversion in the opposite direction is possible with the ToRules command, but how to go in the other way?

Thanks Zhao

POSTED BY: Zhaochen He
2 Replies

or :

In[1]:= {a -> b, c -> d} /. Rule -> Equal

Out[1]= {a == b, c == d}
POSTED BY: Kay Herbert
Posted 9 years ago
In[1]:= rule = (x_ -> y_) -> (x == y)

Out[1]= (x_ -> y_) -> x == y

In[2]:= a -> b /. rule

Out[2]= a == b

In[3]:= {a -> b, c -> d} /. rule

Out[3]= {a == b, c == d}
POSTED BY: David Keith
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract