问题
I can call a .m
file in Matlab from Java and that works fine, but I want to retrieve the results from Matlab and display them in Java. How can I do this?
回答1:
matlabcontrol is a Java API which will allow you to do just that. It allows for invoking eval and feval in MATLAB and returning the results to MATLAB. The walkthrough explains with examples how to do this. The walkthrough uses built-in MATLAB functions and commands, but you can use it with your own .m files because using matlabcontrol is just like interacting with MATLAB's Command Window.
来源:https://stackoverflow.com/questions/794997/how-do-i-get-results-from-matlab-in-java