NOTE: pay attention to version supported!
as of 2024/11, while Python3.13 is released, Python 3.9-12 is supported by matlab engine
https://ww2.mathworks.cn/help/matlab/matlab_external/call-matlab-functions-asynchronously-from-python.html
start_matlab() → matlab.engine.MatlabEngine
find_matlab() → tuple[str, …] (NOTE: exec [matlab.engine.shareEngine](<https://ww2.mathworks.cn/help/matlab/ref/matlab.engine.shareengine.html>)[(name)]
or in matlab first is a must and fetch name via matlab.engine.engineName
)
connect_matlab(str) (ref matlab.engine.connect_matlab)
about the str used to connect: “MATLAB_<pid>”
以下 约定 engine 为matlab.engine.MatlabEngine实例