[Date Index] [Thread Index] [Author Index]
Re: Help Needed: How to use a Notebook from an external Program via Mathlink?
Hi Ulrich, Hi, you may have a look at my book "Mathematica und C in der modernen Theoretischen Physik" Springer-Verlag 1997, ISBN3-540-61489-3 It includes seven MathLink programs even for some complicated tasks and it has a chapter and the C- source for some high quality initial value solvers. > I am a Mathematica beginner (so perhaps the question is not hard at all) > and I have to develop a software for a couple of tasks, some of them > being numerical evaluations of differential equations (e.g.). > > I have to decide whether > 1. to write the software monolithically OR > 2. to use Mathematica for easy definition of the differential equations to > be solved > > QUESTION(S): > Can I use Mathematica to specify the eqations / systems to be solved, > sending only parameters from my main program via Mathlink? Yes. I principle you can almost everything with MathLink. What you plan is the opposite of the usual task. Typical one uses the MathLink program for fast numerical solution of the differential equations and Mathematica send the parameter to the MathLink child and display the results. > The standard way seems to send everything via Mathlink, but I want > to stay within Mathematica as far as the mathematical side of the overall > system is concerned. > Can I tell Mathematica to load and use a pre-defined notebook (with my > definitions)? You should load a package. The Notebook is a use a useless overhead. Because you need the definitions in the kernel it is better to use a package and load it via Get["somedefines.m"] You can simply add a Evaluate:Get["somedefs.m"] to your C-code and the package is loaded. Hope that helps Jens