Ask Your Question
1

How do I write and implement a program in Sage for Windows?

asked 2019-10-18 22:29:30 -0500

D_S gravatar image

I downloaded Sage 8.9 for Windows and want to use it to do some matrix computations. I do not have any prior experience in programming. So far I've been able to use the SageMath 8.9 Console to declare variables, define matrices, and multiply them together. But I want to write a program which does these computations successively and have SAGE implement it, rather than me typing in the commands one at a time.

I haven't been able to find how to do this in any tutorials. I don't understand where exactly I should be writing the code, how to save the file, how to get SAGE to read the program I wrote and implement it.

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
1

answered 2019-10-19 03:20:10 -0500

tmonteil gravatar image

updated 2019-10-19 03:21:32 -0500

You just have to learn the Python language and put your sequence of computations into a function. Basically, you can se Sage as Python bootsted with mathematical typse such as matrices, graphs, etc. There are tons of nice tutorials about the Python language on the web. See also this piece of doc

edit flag offensive delete link more
0

answered 2019-10-20 13:11:38 -0500

Peter Luschny gravatar image

Perhaps it is this what you want: After the installation of SageMath you will see a button "SageMath Notebook" on your desktop. Click, your default browser opens what is "Jupyter's home", click the button "New", choose SageMath, a new notebook opens and than you can write and save your programs without using the Console.

This will look similar to https://github.com/davidlowryduda/not...

edit flag offensive delete link more

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: 2019-10-18 22:29:30 -0500

Seen: 137 times

Last updated: Oct 20 '19