从Java调用matlab回调/函数句柄 [英] Calling matlab callback/function handle from Java
问题描述
如何将matlab函数句柄传递给Java对象并从Java中调用它(也就是说,我希望Java在计算准备就绪时告诉matlab)。我试图使用com.mathworks.jmi.Matlab类来评估Java对象中的Matlab表达式,但我不知道如何1)将回调funcktion句柄传递到Java,和2)从Java调用它可能使用com.mathworks.jmi.Matlab类。
How do I pass a matlab function handle to a Java object and invoke it from within Java (that is, I want Java to tell matlab when it is ready with a calculation). I am trying to use the com.mathworks.jmi.Matlab class for evaluating Matlab expressions in the Java object, but I can't see how to 1) transfer the callback funcktion handle to Java, and 2) invoke it from Java possibly using the com.mathworks.jmi.Matlab class.
谢谢,
jakob
Thanks, jakob
推荐答案
嗯。看起来像JMI是那些matlab内部的东西,可能会在未来的版本中发生变化。我发现这些在线文章,不知道他们是否会帮助你的情况。
Hmm. Looks like JMI is one of those matlab internals things which may be subject to change in future versions. I found these online articles, not sure if they will help in your case.
- http://www.mathworks.com/matlabcentral/newsreader/view_thread/239803
- http://www.mathworks.co.uk/matlabcentral/newsreader/view_thread/ 250598
- http ://www.cs.virginia.edu/~whitehouse/matlab/JavaMatlab.html
- http://www.mathworks.com/matlabcentral/newsreader/view_thread/239803
- http://www.mathworks.co.uk/matlabcentral/newsreader/view_thread/250598
- http://www.cs.virginia.edu/~whitehouse/matlab/JavaMatlab.html
这篇关于从Java调用matlab回调/函数句柄的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!