First time here? Check out the FAQ!

Ask Your Question
0

Using Mathics and reusing its computed results

asked 2 years ago

Cyrille gravatar image

As I am curious and a former Mathematica user, I have installed mathics on my computer then I have tried the following simple code

from sage.interfaces.mathics import mathics
sys = mathics('{x^2 - 3y == 3, 2x - y == 1}')
print(sys)

which works as expected (show() is not available for displaying the result since it returns the LaTeX code). Then I use

sys1=sys.Sage()

to convert sys to sageMath. Calling it I have

image description

But from there I have not found the way to extract the values of x to reuse it in SageMath. Has some one a possible solution?

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
0

answered 2 years ago

Max Alekseyev gravatar image

I don't have access to mathics but my guess is that you need to define variables x and y in Sage first and then translate mathics' variables into those in Sage - like:

x, y = var('x y')
sys._sage_(locals={'x':x, 'y':y})
Preview: (hide)
link

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2 years ago

Seen: 198 times

Last updated: May 08 '23