MathGroup Archive 2000

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

Search the Archive

Re: MathLink MLGetRealArray

  • To: mathgroup at smc.vnet.net
  • Subject: [mg22007] Re: MathLink MLGetRealArray
  • From: miyaji at taiiku.tsukuba.ac.jp (Chikara MIYAJI)
  • Date: Thu, 10 Feb 2000 02:25:49 -0500 (EST)
  • Organization: University of Tsukuba
  • References: <87iph4$3vb@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi Johannes,

In article <87iph4$3vb at smc.vnet.net>, "Johannes Ludsteck"
<ludsteck at zew.de> 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:
:Begin:
:Function:              kerndens
:Pattern:               kerndens[y_List,x_?MatrixQ,kernelWidth_Real]
:Arguments:             {y,x,kernelWidth}
:ArgumentTypes:         {Manual}
:ReturnType:            Manual
:End:


  • 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