| MATLAB Application Program Interface | Search  Help Desk |
| matPutFull (Obsolete) | See Also |
V4 Compatible
This function is obsolete; it should not appear in a MATLAB 5 program. To use this function in existing code, use the-V4 option of the mex script.
In MATLAB 5 you should call
mxCreateDoubleMatrix and matPutArrayFor example,
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);
mxSetName(parr, name);
mxSetPr(parr, pr);
mxSetPi(parr, pi);
/* Use put to place array on file. */
retval = matPutArray(ph, 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, matPutArray