mxSetPi (C)
(Not recommended) Set imaginary data elements in
mxDOUBLE_CLASS array
mxSetPi is not available in the interleaved complex API. Use
mxSetComplexDoubles instead. For more information, see Version History.
C Syntax
#include "matrix.h" void mxSetPi(mxArray *pm, double *pi);
Description
Use mxSetPi to set the imaginary data of the specified
mxArray.
Most mxCreate* functions optionally allocate heap space to hold
imaginary data. If you allocate heap space when calling an mxCreate*
function, then do not use mxSetPi to initialize the imaginary
elements of the array. Instead, call this function to replace existing values with new
values. Examples of allocating heap space include setting the
ComplexFlag to mxCOMPLEX or setting
pi to a non-NULL value.
The mxSetPi function does not free any memory allocated for
existing data that it displaces. To free existing memory, call
mxFree on the pointer returned by
mxGetPi.