Export Matlab function as standalone python code which runs without Matlab Runtime
显示 更早的评论
Hi,
I have a simple Matlab function without any args that generates a 1x100 vector and calculates the rms of that vector and writes it to a text file.
This function is also called in a sample test file to execute it.
I would like to be able to translate these .m files into Python standalone code; meaning I can run the Python code without any required software from Matlab like Matlab Runtime due to its large size.
I've tried the following:
- Use the Library Compiler app from Matlab. This is good but requires Matlab Runtime on the system to be able to run (from what I've read)
- Convert the Matlab code into standalone C/C++ code and use a Python wrapper (Cumbersome and might give compatibility problems in some cases)
So, my question: is there a way to translate these .m files into Python standalone code? If I could be able to use a UI like Library Compiler it would be even better.
3 个评论
dpb
2023-11-8
If you want to use Python, then just code in Python. There's no chance TMW is going to build such a toolset.
Francois
2023-11-13
dpb
2023-11-14
No disagreement on the bulkiness of the MATLAB distribution model...there definitely should be a way for a targetted runtime for a specific app rather than the whole enchilada it currently is of virtually everything.
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Python Package Integration 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!