mxSetPi (C)
(Not recommended) Set imaginary data elements inmxDOUBLE_CLASS
array
mxSetPi
is not available in the interleaved complex API. UsemxSetComplexDoubles
instead. For more information, seeCompatibility Considerations.
C Syntax
#include "matrix.h" void mxSetPi(mxArray *pm, double *pi);
Description
UsemxSetPi
to set the imaginary data of the specifiedmxArray
.
MostmxCreate
* functions optionally allocate heap space to hold imaginary data. If you allocate heap space when calling anmxCreate
* function, then do not usemxSetPi
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 theComplexFlag
tomxCOMPLEX
or settingpi
to a non-NULL
value.
ThemxSetPi
function does not free any memory allocated for existing data that it displaces. To free existing memory, callmxFree
on the pointer returned bymxGetPi
.