I'm calling MATLAB program from Eclipse Java interface. I have used MatlabControl for it. When I run Java program multiple time, every time it opens a new instance of MATLAB, and that makes the computation slower.
Is it possible that I can prevent it from opening new instances of MATLAB? If possible, how can I do this?
If I have an already opened terminal of MATLAB, is it possible that the computation can simply use that terminal, instead of opening a new instance of MATLAB?
Any help would be appreciable.
答案 0 :(得分:1)
答案 1 :(得分:0)
以下是来自matlabcontrol教程的关于此问题的评论:
khai评论... @ gmail.com,2012年2月9日 要重用现有会话,需要首先断开先前的代理。这是一个例子,
MatlabProxyFactoryOptions options = new MatlabProxyFactoryOptions.Builder().setUsePreviouslyControlledSession(true).build();
MatlabProxyFactory factory = new MatlabProxyFactory(options);
MatlabProxy proxy = factory.getProxy();
...
proxy.disconnect();
proxy = factory.getProxy(); // this won't open a new Matlab session
它对我不起作用。但是一些人声称它完成了这项工作。
感谢。除了可以满足我要求的matlabcontrol之外还有其他方法吗? - user24094
matlabcontrol的其他替代方法: https://code.google.com/p/matlabcontrol/wiki/ApproachesToControl
希望你管理,这是一个真正的痛苦ITA工作....欢呼