简体   繁体   English

可以使用其他编程语言的Mathematica(python / C#)吗?

[英]Possible to use Mathematica from other programming languages (python/C#)?

Is it possible to use Mathematica's computing capabilities from other languages? 是否可以使用Mathematica的其他语言的计算能力? I need to do some complex operations (not necessarily symbolic, btw), and it'd be pretty sweet to be able to just call Mathematica's functions or running Mathematica's code right from my python/c#'s program. 我需要做一些复杂的操作(不一定是象征性的,顺便说一句),能够直接从我的python / c#程序中调用Mathematica的函数或运行Mathematica的代码是非常可爱的。

Is it possible? 可能吗?

Looks like there is a MathLink API you can use from C#, c or Java, have you checked this out? 看起来你可以在C#,c或Java中使用MathLink API,你有没有看过这个?

http://reference.wolfram.com/mathematica/guide/MathLinkAPI.html http://reference.wolfram.com/mathematica/guide/MathLinkAPI.html

关于python.Net的使用的链接(对于C#)

Perhaps the easiest way is to make the Mathematica program its own self-contained script and just call it as a system call or pipe stuff to/from it via stdin/stdout. 也许最简单的方法是使Mathematica程序成为自己独立的脚本,并通过stdin / stdout将其称为系统调用或管道内容。 Here's how to do that: 以下是如何做到这一点:

Call a Mathematica program from the command line, with command-line args, stdin, stdout, and stderr 从命令行调用Mathematica程序,使用命令行args,stdin,stdout和stderr

I haven't used it, but this looks interesting . 我没有用它,但这看起来很有趣 Looks like you can call Mathematica code directly from your C# app using .NET/Link (a product by Wolfram). 看起来您可以使用.NET / Link(Wolfram的产品)直接从您的C#应用​​程序调用Mathematica代码。

Yes but there are some subtleties. 是的,但有一些微妙之处。 I covered Mathematica .NET interoperability in my book F# for Scientists but dropped the subject for its successor F# for Technical Computing . 我在我的F#for Scientists一书中介绍了Mathematica .NET的互操作性,但放弃了技术计算的继任者F#的主题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM