WSPutReal64Array (C 函数)
int WSPutReal64Array(WSLINK link,double *a,int *dims,char **heads,int d)
把一双精度浮点数数组写入由 link 指定的 WSTP 连接中形成深度为 d,维数为 dims 的数组.
范例
基本范例 (1)
#include "wstp.h"
/* put an array of double-precision floating-point numbers to a link */
void f(WSLINK lp)
{
double array[2][10][2];
int dims[3];
int i;
for(i = 0; i < 40; i++)
*((double *)array + i) = i + .1;
dims[0] = 2;
dims[1] = 10;
dims[2] = 2;
if(! WSPutReal64Array(lp, (double *)array, (int *)dims, (char **)0, 3))
{ /* unable to send the double array to lp */ }
}