Mathlink formulas return different results
- To: mathgroup at smc.vnet.net
- Subject: [mg33551] Mathlink formulas return different results
- From: "Lawrence A. Walker Jr." <lwalker701 at earthlink.net>
- Date: Fri, 29 Mar 2002 06:14:09 -0500 (EST)
- Organization: Morgan State University, COMSARE
- Sender: owner-wri-mathgroup at wolfram.com
Hi, I have created a transistor modeling application that uses Mathlink to set up a link between by custom made functions and Mathematica. The problem I've been running into is that every time I execute a particular function (the C function linked to Mathematica via Mathlink) in the Mathematica session, I get three different results using the same input! I ran into a similar problem before. I fixed the problem by removing from the template file (*.tm) any definitions of functions that I was calling from the main function. For instance, let's say I have a C function called foo. This function calls another function goo. And I define both foo and goo in the template as Foo[] and Goo[]. This setup led to the aforementioned problem. When I removed goo/Goo definitions from the template (*.tm) the problem went away. I've read Todd Gayley's tutorial on Mathlink. This seems like this may be a common problem. Is there something special I should be doing to eliminate this problem? Does it have some to do with 'flushing packets'? Thanks, Lawrence -- Lawrence A. Walker Jr. http://www.kingshonor.com