Ada:与 Matlab 交互

发布于 2024-09-11 07:19:40 字数 308 浏览 11 评论 0原文

由于 Ada 没有任何好的科学计算库,我想知道是否有人能够在 Ada 中使用 Matlab 数学函数,例如 eig(用于计算特征值和特征向量)。

我看到 simulink 和 Ada 存在一些接口。但我不是 Simulink 的用户。我希望能够通过 Ada 函数和过程使用 Matlab 数学函数。

PS:在早期的 Ada 文档中,有很多讨论并承诺创建类似于 NAG 或 NUMAL 的良好数值库。我确实想知道为什么这从未成功具体化,也没有任何优秀且强大的科学计算库可供使用。当然,在我看来,Ada 语言并不比任何其他科学计算语言黯然失色。

多谢...

since Ada doesn't possess any good libraries for scientific computing, I was wondering if anyone has been able to use Matlab mathematical functions such as eig (for calculations of eigenvalues and eigenvectors) within Ada.

I see that some interfaces exist for simulink and Ada. But I'm not a user of Simulink. I would like just to be able to use Matlab mathematical functions through perhaps Ada functions and procedures.

PS: In earlier Ada documents there were lots of talks and promises to create good numerical libraries similar to NAG or NUMAL. I do wonder why this has never been concretized successfully, and any good and robust scientific computing library made available. For sure the Ada language doesn't pale before any other scientific computing language in my opinion.

Thanks a lot...

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

只为守护你 2024-09-18 07:19:40

我找不到任何相关信息,这确实有点令人惊讶。

如果它有 C 接口,则可以编写您自己的绑定到您需要的例程。只需使用接口编译指示即可。包中定义的类型 Ada.Interfaces.C 也会有帮助。不过,在自定义绑定上进行链接和测试可能是一个小小的挑战。

另外,Gnat 的最新版本似乎带有 绑定生成器 可以从 C 头文件中为您创建 Ada 绑定。还有另外六个此类工具此处提供,包括适用于 Windows COM DLL< /a> 我听说过一些好消息。

I can't find anything about it, which is indeed a bit surprising.

If it has a C interface, it is possible to write your own bindings to the routines you need. Just use the interfacing pragmas. The types defined in the package Ada.Interfaces.C would also be of help. Getting things linking and tested on a custom binding can be a wee bit of a challenge though.

Also, it looks like recent versions of Gnat come with a binding generator that can create Ada bindings for you out of C header files. There are six more such tools available here, including one that works on Windows COM DLLs that I've heard good things about.

忘东忘西忘不掉你 2024-09-18 07:19:40

使用 Ada 的 lapack 非常简单。您不需要为此调用 MatlabLapcakMatlab 使用的库相同。

It is very easy to use lapack from Ada. You do not need to call Matlab for that. Lapcak is the same library which Matlab uses as well.

坏尐絯℡ 2024-09-18 07:19:40

Ada.Numerics 下有几个执行矩阵和向量运算的包

There are few packages under Ada.Numerics which perform the matrix and vector operations

稚气少女 2024-09-18 07:19:40

作为 Ada.Numerics.Generic_Real_Arrays 的补充,开源库 Mathpaqs 中提供了 Generic_Real_Linear_Equations,特别是 Cholesky 和 ​​LU 分解://sourceforge.net/projects/mathpaqs/" rel="nofollow noreferrer">此处 或 此处

As a complement to Ada.Numerics.Generic_Real_Arrays, there is Generic_Real_Linear_Equations with, notably, Cholesky and LU decomposition, available in the open-source library Mathpaqs here or here.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文