MathGroup Archive 2007

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

Search the Archive

Re: help

  • To: mathgroup at
  • Subject: [mg72601] [mg72601] Re: help
  • From: Jens-Peer Kuska <kuska at>
  • Date: Thu, 11 Jan 2007 04:00:50 -0500 (EST)
  • Organization: Uni Leipzig
  • References: <eo00ht$kl1$>
  • Reply-to: kuska at


when you define the pattern for f[] in the template file you should 
setup a pattern like

:Pattern: f[x_Real,y_Real]

and mathematica will do the rest, because an expression is evaluate
from the inner expression to the outer one, it will in f[g[x],y]
first evaluate g[x] that should return a floating point number and than
Mathematica will call your MathLink function, when y is also a floating 
point number.


jinghantao wrote:
> Dear Sir,
>    I begin to learn something about mathlink in mathematica, because I have some c/c++ and Fortran programs and I want they can be called in mathematica. As a beginner, I read materials such as "Mathlink Tutorial" and "Mathematica Help". and try to run examples refered in they. So far these examples have been run on my computer. 
>    In fact, I want to call external programs from the mathematica Kernel and work in mathematica such as f[g[x],y]. This form is different from the example of addtwo[i,j] function. The first paramter in function is function in the former rather than a variable. Furthermore, for the g[x], I can define it in mathematica. I want look for such examples, but I fail at last. I hope that you can give me some examples or corresponding materials. thank you very much.
> jinghantao
> jinght at
> 2007-01-09

  • Prev by Date: Re: How to export txt files with variable name &
  • Next by Date: Re: Call-by-reference from inside a function
  • Previous by thread: Re: help
  • Next by thread: Re: NDSolve with a constraint : how ?