Re: Calling Mathematica function from a C program
- To: mathgroup at smc.vnet.net
- Subject: [mg18763] Re: Calling Mathematica function from a C program
- From: "P.J. Hinton" <paulh at wolfram.com>
- Date: Tue, 20 Jul 1999 01:33:25 -0400
- Organization: "Wolfram Research, Inc."
- References: <email@example.com>
- Sender: owner-wri-mathgroup at wolfram.com
On 17 Jul 1999, aranisin wrote: > I would like to call the Mathematica function 'CurveFit' from a C > program. I want to pass to it an array of numbers and obtain the > curve. > > (i) I am wondering whether it can be done and if so, how. It can be done. > (ii) Do I need to use MathLInk? Using the MathLink API would be an appropriate use here. Basically, your C program is working as an alternative front end to the Mathematica kernel. The MathLink Developer's kit that appears on the professional version of Mathematica contains some sample C programs that demonstrate this kind of connection. > (iii) We have a license for MAthematica. Does the use of MAthlink > require a separate license? Depends on the type of license you have. In general, as long as the kernel is running in a manner in line with your license, it matters not where your C program is running. The only hurdle you have to overcome is to provide a mechanism for remotely invoking the kernel (e.g. RSH protocol). -- P.J. Hinton Mathematica Programming Group paulh at wolfram.com Wolfram Research, Inc. Disclaimer: Opinions expressed herein are those of the author alone.