在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):jaderberg/python-matlab-bridge开源软件地址(OpenSource Url):https://github.com/jaderberg/python-matlab-bridge开源编程语言(OpenSource Language):MATLAB 64.8%开源软件介绍(OpenSource Introduction):Python-MATLAB BridgeA simple interface to allow Python to call MATLAB functions. Unlike other interfaces, MATLAB only has to start once. All communication is done over a TCP server (credit to D.Kroon University of Twente for the TCP server). This has not been tested on Windows. UsageInitialize the Matlab class. You must pass in your matlab executable, e.g.
By default the host is localhost and the port is 4000. This can be changed, e.g.
You must then start the MATLAB server:
which will return True once connected. You can then run any local MATLAB function contained within a .m file of the same name. For example, to call the function jk in jk.m:
by calling:
which will print 8. You can shut down the MATLAB server by calling
NB: you can call MATLAB code before the server starts by adding code to the ./matlab/startup.m file. ExampleAn example MATLAB function and usage from Python is shown in test.py and test.m and you can also see a Notebook using the Plotly MATLAB API. TODO
Max Jaderberg 2012 |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论