gpt4 book ai didi

java - 在 Java 中运行 m 文件

转载 作者:行者123 更新时间:2023-11-29 06:04:22 25 4
gpt4 key购买 nike

我有一个用 m 文件编写的 matlab 函数。 (它不是我写的,看起来是一个复杂的算法)现在我想将它与 java 应用程序一起使用。我在互联网上搜索并学习了如何在 java 中运行 matlab 代码。

例如here它说如何做到这一点。但我无法理解如何在不知道函数功能的情况下使用 java 中的确切 matlab 函数。有人可以帮我解决这个问题吗?

最佳答案

我不确定 MatlabControl 是否是您所需要的。它只是将 Matlab 作为服务器运行并向其发送命令。您将不能将它提供给您的用户,除非他们都愿意为安装 Matlab 付费。

如果您想部署您的应用程序,请考虑使用 Matlab Builder JA .来自网站:

MATLAB Builder™ JA enables you to create Java™ classes from your MATLAB® programs. These Java classes can be integrated into Java programs and deployed royalty-free to desktop computers or Web servers that do not have MATLAB installed.

此外,如果您使用 MatlabControl,将来可能会出现兼容性问题 - 检查一下:

This API relies upon the Java MATLAB Interface distributed with all recent copies of MATLAB. This interface is entirely undocumented and there is no guarantee matlabcontrol will work with all versions of MATLAB and operating systems. Efforts are made to ensure compatibility with MATLAB R2007b and greater, see here for specifics.

关于java - 在 Java 中运行 m 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9052677/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com