MathGroup Archive 2004

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

Search the Archive

Re: Extracting Interpolating Function via mathlink

  • To: mathgroup at
  • Subject: [mg50797] Re: Extracting Interpolating Function via mathlink
  • From: Jens-Peer Kuska <kuska at>
  • Date: Wed, 22 Sep 2004 00:10:55 -0400 (EDT)
  • Organization: Universitaet Leipzig
  • References: <ciomuh$r8l$>
  • Reply-to: kuska at
  • Sender: owner-wri-mathgroup at


a) look in the AddOns`ExtraPackages`InterpolationFunctionAnatomy`
   it has several function to extract the data points, namely
b) send the funtion values and as a single array to the C-program

as an alternative you may semple the interpolation functions on
a discrete grid in Mathematica and use this table in you c-code

or you should solve the differential equations totla in the c-program.


Peter Saffrey wrote:
> I'm writing an application that interfaces with Mathematicas
> differential equation solving routines via mathlink. The equations are
> loaded and solved and then I need to extract the resulting
> interpolating functions for use in the rest of my application. At the
> moment, I have a mathematica function which dumps the data points, one
> by one, which I grab and insert into C++ objects. This works, but it's
> very slow on large functions - when there are 10000 data points, this
> takes about 30 seconds per function.
> I suspect the reason for the poor performance is that I'm calling too
> many mathlink functions - each data point is three "getpacket" calls,
> one for the a list header, and one for each part of the data point. Is
> there a way I can do this more quickly? How about exporting the whole
> list of points as some kind of C++ structure I can then parse with
> using mathlink? Does anybody know how I might do this?
> Thanks,
> Peter

  • Prev by Date: Re: Font rendering in Mathematica 5.0 on Mac OS X
  • Next by Date: Re: Bilinear Transforms-> Möbius transforms
  • Previous by thread: Extracting Interpolating Function via mathlink
  • Next by thread: Re: Extracting Interpolating Function via mathlink