How can libraries of functions compiled with Matlab Complier SDK be accessed in Python?
Show older comments
I am trying to evaluate the Matlab Compiler SDKs functionality to port a large code base in Matlab to be used in Python. I have a folder of matlab .m functions that all of the form:
function [y1, y2,...] = funcname(x1, x2, ...)
Matlab code and comments
y1 = f(x1,x2,...);
y2 = f(x1,x2,...);
end
The individual function scripts have varying numbers of input and output arguments but all call common Matlab functions or other functions in the source folder. So I have a list of files
- function1.m
- function2.m
- functionN.m
I have compiled them using the functions into a python package using the Matlab Compiler and run the installation using the GUI and Python setup files produced in the for_redistribution_files_only folder using Anaconda.

The library shows up in ~\Anaconda\Lib\site-packages\ repository. How do I load this into Python and call the functions included in the complied package? Ideally, I would like to create a class structure in Python that is populated by the individual function names used to create the library.
The Mathworks documentation only shows how to handle a single file http://www.mathworks.com/help/compiler_sdk/gs/create-a-python-application-with-matlab-code.html.
Thanks in advance.
Accepted Answer
More Answers (0)
Categories
Find more on Python Package Integration in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!