Article View: comp.sys.next.programmer
Article #579Re: Linking a C program to Mathematica (ver. 1.2)
From: Charles Fletcher
Date: Wed, 08 Apr 1992 17:12
Date: Wed, 08 Apr 1992 17:12
59 lines
3230 bytes
3230 bytes
In article <1992Apr8.132658.9582@msuinfo.cl.msu.edu> engelsma@golden.cps.msu.edu (Engelsma Jonathan) writes: >In article <1992Apr4.002423.7852@athena.mit.edu>, shanega@athena.mit.edu (Shane G. Artis) writes: >|> Hi! Does anybody have any code fragments or code files that give a >|> good example of linking a C program to Mathematica's Kernel, when >|> running on a NeXT computer with Mathematica version 1.2? I need >|> to establish a two-way link and send matrices back and forth, as >|> well as perform various other common Mathematica operations upon my >|> data (both symbolic and numerical). >|> >|> Any suggestions/code? >|> > >I found a small tech report from wolfram in the manuals that came >with our Sun version of mathematica that was quite useful. It is >entitled: Mathlink External Communication in Mathematica. I >suppose you would need to contact Wolfram to get a copy. Can >somebody listening comment on the availibility of this tech report? Yes, you can get this from WRI (I believe it is still free), but don't bother (yet.) As I wrote Shane, there a basically five ways to connect C->Mma: 1) MathLink--This is a standard set down by WRI (and is suppose to connect their kernels and frontends in the future.) For all practical purposes, this doesn't work at this time (I would be glad to hear from *anyone* to the contrary.) After making some changes to the code, I did get the frontend example working (see the MathLink directory under Mathematica.app) However, I haven't gotten any of the simple examples to work that are given in the docs (nor do I know anyone who has.) Some WRI reps told me that MathLink still isn't working (note that WRI isn't using it.) Word has it that it will be working in version 2.1, whenever that comes along. 2) It's Unix, so use pipes. This has been done (OTI palettes do it this way I believe.) Mark Phillips wrote an article in the Fall 1990 Mathematica Journal which included discussion on how he used pipes to connent with Mma. His software, with source, is available by ftp from 'poincare.geom.umn.edu'. 3) Get the OTI Math Palette. This is the easiest way to go. It is somewhat costly, but they do have good educational discounts. 4) Get the Rare MathTool. This is actually a class (originally written by Chuck Fleming of Allegheny fame) that uses Speaker- Listener to connect to Mma. I don't know pricing. 5) Write your own S-L connection (or wait on NS3.0). See the Real Time Algebra demo for motavition (but no source.) Good luck, Charlie -- Charlie *********************************************************************
Technical Details
Message-ID:
<1992Apr8.171212.23130@socrates.umd.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!haven.umd.edu!socrates!fletcherReferences:
<1992Apr4.002423.7852@athena.mit.edu> <1992Apr8.132658.9582@msuinfo.cl.msu.edu>Show Full Headers
Complete Article Headers
Newsgroups: comp.sys.next.programmer,sci.math.symbolic Path: arc1-ca.pugleaf.net!sparky!uunet!haven.umd.edu!socrates!fletcher From: fletcher@socrates.umd.edu (Charles Fletcher) Subject: Re: Linking a C program to Mathematica (ver. 1.2) Message-ID: <1992Apr8.171212.23130@socrates.umd.edu> Keywords: Mathematica, MathLink, MathTool, OTI MathPalette, Mark Phillips Organization: University of Maryland University College References: <1992Apr4.002423.7852@athena.mit.edu> <1992Apr8.132658.9582@msuinfo.cl.msu.edu> Date: Wed, 8 Apr 1992 17:12:12 GMT