External Interfaces Reference |
int matPutFull(MATFile*ph, char *name, int m, int n, double *pr, double *pi) { int retval; mxArray *parr; /* Get empty array struct to place inputs into. */ parr = mxCreateDoubleMatrix(0, 0, 0); if (parr == NULL) return(1); /* Place inputs into array struct. */ mxSetM(parr, m); mxSetN(parr, n); mxSetPr(parr, pr); mxSetPi(parr, pi); /* Use put to place array on file. */ retval = matPutVariable(ph, name, parr); /* Zero out pr & pi in array struct so the mxArray can be destroyed. */ mxSetPr(parr, (void *)0); mxSetPi(parr, (void *)0); mxDestroyArray(parr); return(retval); }
See Also
mxCreateDoubleMatrix
, matPutVariable
matPutArrayAsGlobal (Obsolete) | matPutMatrix (Obsolete) |
© 1994-2005 The MathWorks, Inc.