First time here? Check out the FAQ!

Ask Your Question
1

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

asked 5 years ago

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.

Preview: (hide)

2 Answers

Sort by » oldest newest most voted
1

answered 5 years ago

tmonteil gravatar image

updated 5 years ago

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

Preview: (hide)
link
0

answered 5 years ago

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...

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: 5 years ago

Seen: 566 times

Last updated: Oct 20 '19