| Author |
Comment/Response |
Bill Simpson
|
02/28/13 11:21am
In[1]:= b=5;
c=10;
Solve[c==a+b,a]
Out[3]= {{a->5}}
Notice the difference between = and == in that.
When you know there is only one solution and you want just the number then modify slightly
In[4]:= b=5;
c=10;
a/.Solve[c==a+b,a][[1]]
Out[6]= 5
Or even
In[7]:= b=5;
c=10;
a=a/.Solve[c==a+b,a][[1]]
Out[9]= 5
And a now has the value 5
URL: , |
|