i wrote a program in which we need to find the values of two variables a and b and then give their sum.But, when i do a+b, it tells
In[60]:= a + b
Out[60]= a + b
what is the problem?
This is a discussion on Mathematica program non-coordination between solve function and variable definition? within the Tech Board forums, part of the Community Boards category; i wrote a program in which we need to find the values of two variables a and b and then ...
i wrote a program in which we need to find the values of two variables a and b and then give their sum.But, when i do a+b, it tells
In[60]:= a + b
Out[60]= a + b
what is the problem?
Without more code, we canīt say - because we canīt see your screen.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
I support http://www.ukip.org/ as the first necessary step to a free Europe.
Code:In[55]:= Solve[{2 a + 3 b == 9, a - 23 b == 16}, {a, b}] Out[55]= {{a -> 255/49, b -> -(23/49)}} In[56]:= a + b Out[56]= a + b
Last edited by suryap.kv1bbsr; 10-09-2010 at 04:17 AM. Reason: this was the code
Looks OK to me. I even plugged it into wolframalpha.com, which is there kind of free to the public calculator that supports mathematica syntax.
*had to use code tags because bbcode engine thought this was code...Code:http://www.wolframalpha.com/input/?i=Solve[{2+a+%2B+3+b+%3D%3D+9%2C+a+-+23+b+%3D%3D+16}%2C+{a%2C+b}]