[sympy] user friendly simple equation solver

2012-01-06 Thread Bjorn
Hi, I am new to sympy and I have a basic question. I would like to use sympy to sovle simple sets of equations in a text editor. like given the following as plain text: a = 10 b = 20 a * 12 + 50*c == 456 + b and an instruction to solve for c, then ptorduce: c = 7.12 I know sympy comes with a

Re: [sympy] user friendly simple equation solver

2012-01-06 Thread Christophe BAL
Hello, try the following. Best regards. Christophe. === #!/usr/bin/env python2 from sympy import * # Une equation toute simple var('a b c') a = 10 b = 20 print solve(a * 12 + 50*c - (456 + b), c) -- You received this message because you are subscribed

Re: [sympy] user friendly simple equation solver

2012-01-06 Thread Aaron Meurer
It's not clear what exactly you want to do. Here are some suggestions, though, that may or may not be what you want. - To parse an expression given in string form into a SymPy object, us the sympify() function: In [12]: sympify(a*12 + 50*c) Out[12]: 12⋅a + 50⋅c Note that I did not have a or c

Re: [sympy] user friendly simple equation solver

2012-01-06 Thread Chris Smith
On Fri, Jan 6, 2012 at 4:52 PM, Bjorn bjornj...@gmail.com wrote: Hi, I am new to sympy and I have a basic question. I would like to use sympy to sovle simple sets of equations in a text editor. like given the following as plain text: a = 10 b = 20 a * 12 + 50*c == 456 + b and an