Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2000

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

Search the Archive

Re: MathLink MLGetRealArray

  • To: mathgroup at
  • Subject: [mg22007] Re: MathLink MLGetRealArray
  • From: miyaji at (Chikara MIYAJI)
  • Date: Thu, 10 Feb 2000 02:25:49 -0500 (EST)
  • Organization: University of Tsukuba
  • References: <87iph4$>
  • Sender: owner-wri-mathgroup at

Hi Johannes,

In article <87iph4$3vb at>, "Johannes Ludsteck"
<ludsteck at> wrote:

If you set arguments in the template like  {y,x,kernelWidth}, you
must read each of them according to the order and type, because
these are put on the link.
So, I suppose your MLGetRealArray does not read the correct data.
Before reading x by MLGetArray, you must read y using MLGetRealList
or MLGetIntegerList.

void kerndens(void)
   double **x, temp;
   long *dimsx, depthx;
   char **headsx;

   MLGetRealArray(stdlink, &x, &dimsx, &headsx, &depthx);

   MLPutReal(stdlink, x[0][0]);

   MLDisownRealArray(stdlink, x, dimsx, headsx, depthx);

The template file has the following form:
:Function:              kerndens
:Pattern:               kerndens[y_List,x_?MatrixQ,kernelWidth_Real]
:Arguments:             {y,x,kernelWidth}
:ArgumentTypes:         {Manual}
:ReturnType:            Manual

  • Prev by Date: Re: Saving plotted data as ASCII text data ?
  • Next by Date: Re: Bracket Trouble with IT Keyb.
  • Previous by thread: Re: MathLink MLGetRealArray
  • Next by thread: Highly Oscillatory Integrand