5

Is it possible to use Mathematica's computing capabilities from other languages? 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.

Is it possible?

rcollyer
  • 10,475
  • 4
  • 48
  • 75
devoured elysium
  • 101,373
  • 131
  • 340
  • 557
  • 2
    You may find the answers to http://stackoverflow.com/questions/1352414/complex-calculations helpful as well. – Pillsy Nov 23 '09 at 18:20

5 Answers5

5

Looks like there is a MathLink API you can use from C#, c or Java, have you checked this out?

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

Sean
  • 926
  • 6
  • 11
4

To links about usage of python and .Net (for C#)

Kai Huppmann
  • 10,705
  • 6
  • 47
  • 78
4

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. Here's how to do that:

Call a Mathematica program from the command line, with command-line args, stdin, stdout, and stderr

Community
  • 1
  • 1
dreeves
  • 26,430
  • 45
  • 154
  • 229
1

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).

jheddings
  • 26,717
  • 8
  • 52
  • 65
1

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.

J D
  • 48,105
  • 13
  • 171
  • 274