Ask Your Question

Revision history [back]

Error when trying to access MATLAB from Sage

I'm writing a program in Sage but need to call a function that I've written in MATLAB, sending some input values and receiving back a numerical result. Just to make sure the connection was working, I executed matlab('4+10') in Sage, expecting to get back 14, but instead I got an error: "TypeError: unable to start matlab". Any advice on how I can fix this?

I'm running Sage locally, not online, if that matters. Also, I've heard at least one person say "Why use MATLAB at all? Just use Numpy, etc, in Sage." I'm using the MATLAB extension CVX, which has a much easier interface than Sage's Cvxopt. That's why I prefer to do