How to define equations and inequations in giacpy
Publié : sam. déc. 09, 2017 4:00 pm
I want to use linsolve to solve a linear system of equations (in giacpy). I have already several values in python (pygen types) for the variables (say x,y and z) and I know how to write some equations like 2*x+3*y+4 etc. But what is the best way to write equalities and put them in linsolve. I cannot write 2*x+3*y+4=5 in python, I could use strings but I am sure there is a more elegant way. Any suggestions would be appreciated.
Edit: Thankfully I realized in linsolve I do not need to write equality so writing
works perfectly assuming that the equations are equal to 0.
Edit: Thankfully I realized in linsolve I do not need to write equality so writing
Code : Tout sélectionner
linsolve([2*x+y+z-1,x+y+2*z-1,x+2*y+z-4],[x,y,z])