MathGroup Archive 2007

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

Search the Archive

Re: help

  • To: mathgroup at smc.vnet.net
  • Subject: [mg72601] Re: help
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Wed, 10 Jan 2007 04:33:33 -0500 (EST)
  • Organization: Uni Leipzig
  • References: <eo00ht$kl1$1@smc.vnet.net>
  • Reply-to: kuska at informatik.uni-leipzig.de

Hi,

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.

Regards
   Jens

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 ihep.ac.cn
> 2007-01-09
> 
> 


  • Prev by Date: Re: Re: question on Plot and Show plus Axis Labels:
  • Next by Date: Re: NDSolve with a constraint : how ?
  • Previous by thread: Re: ListDimension function
  • Next by thread: Re: help