What is the correct way of Plotting Matlab's .mat -data in Sage?

52 views
Skip to first unread message

Sami

unread,
Dec 17, 2013, 11:30:31 AM12/17/13
to sage-s...@googlegroups.com
What is the right way of importing Matlab's .mat data into SageMath?
Or to which format should I transform this data for Sage notebook?

Possibly, there is some restrictions in the Notebook, which can be a reason why the data is not plotting.



kcrisman

unread,
Dec 17, 2013, 1:37:52 PM12/17/13
to sage-s...@googlegroups.com, jason...@creativetrax.com
See my answer there - basically, you have to first import the .mat file, then you have to turn it from (e.g.) Numpy into Sage.

To the experts: however, I noticed some things while doing this. 

import numpy
L = numpy.array([[1.0,2.0]])
matrix(L)

works, but 

import numpy
L = numpy.array([1.0,2.0])
matrix(L)

Okay, I get why, but maybe we should at least have a better error message?  Or can we assume that such arrays *should* be convertible to matrices?
Reply all
Reply to author
Forward
0 new messages