如何从Java中的Matlab获得结果? [英] How do I get results from Matlab in Java?

查看:170
本文介绍了如何从Java中的Matlab获得结果?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以从Java在Matlab中调用一个.m文件,它可以正常工作,但是我想从Matlab中检索结果并将其显示在Java中.我该怎么办?

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?

推荐答案

matlabcontrol 是一种Java API,它将允许你就是这样做的.它允许在MATLAB中调用eval和feval并将结果返回给MATLAB. 演练举例说明了如何执行此操作.本演练使用内置的MATLAB函数和命令,但是您可以将其与自己的.m文件一起使用,因为使用matlabcontrol就像与MATLAB的命令窗口"进行交互一样.

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.

这篇关于如何从Java中的Matlab获得结果?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆