MathGroup Archive 1999

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Calling Mathematica function from a C program

  • To: mathgroup at
  • Subject: [mg18763] Re: Calling Mathematica function from a C program
  • From: "P.J. Hinton" <paulh at>
  • Date: Tue, 20 Jul 1999 01:33:25 -0400
  • Organization: "Wolfram Research, Inc."
  • References: <innclip7mp2p2$>
  • Sender: owner-wri-mathgroup at

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
P.J. Hinton
Mathematica Programming Group           paulh at
Wolfram Research, Inc.
Disclaimer: Opinions expressed herein are those of the author alone.

  • Prev by Date: Re: Intersection of 3DGraphics!?
  • Next by Date: Re: Is there a FAQ? (Clear all)
  • Previous by thread: Re: Calling Mathematica function from a C program
  • Next by thread: perceived lack of keyboard shortcuts on front end (was: LaTex on a Mac)