Take the 2-minute tour ×  I am using a proprietary Matlab MEX
file to import some simulation results in Matlab (no source code
available of course!). The interface with Matlab is actually
really simple, as there is a single function, returning a Matlab
struct. I would like to know if there is any way to call this
function in the MEX file directly from Python, without having to
use Matlab?  What I have in mind is for example using something
like SWIG to import the C function into Python by providing a
custom Matlab-wrapper around it... By the way, I know that with
scipy.io.loadmat it is already possible to read Matlab binary
*.mat data files, but I don't know if the data representation in
a mat file is the same as the internal representation in Matlab
(in which case it might be useful for the MEX wrapper).  The
idea would be of course to be able to use the function provided
in the MEX with no Matlab installation present on the system.
share|improve this question add comment  4 Answers  Unless I'm
misundersta