Ask Your Question

Revision history [back]

Matlab values as sage vector or matrix object ?

Hi all !

I tried Sage and I found that having a matlab interface is very useful, however I can't import matlab matrices as sage matrices (or numpy arrays) for further work into sage workspace.

For example :

a = matlab.linspace(1,10,20) # ok

a * 2 # ok

plot(a) # Attribute Error

vector(a) # Not Implemented Error

a.sage() # --> unable to parse output

Is there a way to avoid this problem ? Did I miss something in the documentation or does the MatlabElement type not support the same operations as the vector type does (excepted arithmetic operators) ?

Thanks !