MathGroup Archive 1999

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

Search the Archive

Re: Help Needed: How to use a Notebook from an external Program via Mathlink?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg20238] Re: Help Needed: How to use a Notebook from an external Program via Mathlink?
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Fri, 8 Oct 1999 18:30:15 -0400
  • Organization: Universitaet Leipzig
  • References: <7tgre3$si9@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

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


  • Prev by Date: Re: NonlinearRegress and numerical functions...
  • Next by Date: Re: Replacing Part of a Matrix
  • Previous by thread: Re: Why Doesn't N[Pi,i] Give i Digits For Small i, Mathematica
  • Next by thread: dummy index list