Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to get rid of the Error Message for calling a text file in SageMath

I want to input a matrix from a text file and run it in SageMath. The name of the file is Matrix.It is located in the D-drive and it contains a square matrix of order 4.

I changed the the name of the file from Matrix.txt to Matrix.sage. I then wrote load('Matrix.sage');

But I got an error message which read

Traceback (click to the left of this block for traceback) ... IOError: did not find file 'Matrix.sage' to load or attach

Is it possible for Sage-Math to take input a matrix which is stored in a Text File? Can someone kindly comment?

Note:I want to input the matrix from the text file and find its determinant in SageMath.