Post Reply 
How do I correctly use the SOLVE() function in Python?
09-17-2023, 03:24 PM
Post: #2
RE: How do I correctly use the SOLVE() function in Python?
The CAS library is named cas, not linalg (which is for linear algebra).
Code:

from cas import *
caseval("solve(2x+8=0,x)")
caseval (or xcas) takes a string as argument and returns a string. It can also take a string containing the commandname, and several arguments (maximum 7). These arguments will be printed to a string (unless they are already strings) and appended to the commandname string with "(" and "," and ")" added. Example:
Code:

from cas import *
x="x"
xcas("solve","2x+8=0",x)
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: How do I correctly use the SOLVE() function in Python? - parisse - 09-17-2023 03:24 PM



User(s) browsing this thread: 1 Guest(s)