External Interfaces Reference |
Set new imaginary data for mxArray
C Syntax
Arguments
array_ptr
Pointer to a full (nonsparse) mxArray
.
pi
Pointer to the first element of an array. Each element in the array contains the imaginary component of a value. The array must be in dynamic memory; call mxCalloc
to allocate this dynamic memory. If pi
points to static memory, memory leaks and other memory errors may result.
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 tell an mxCreate
function to allocate heap space (for example, by setting the ComplexFlag
to mxComplex
or by setting pi
to a non-NULL
value), then you do not ordinarily use mxSetPi
to initialize the created mxArray's
imaginary elements. Rather, you call mxSetPi
to replace the initial imaginary values with new ones.
Examples
See mxisfinite.c
and mxsetnzmax.c
in the mx
subdirectory of the examples
directory.
See Also
mxSetImagData
, mxGetPi, mxGetPr, mxSetPr
mxSetNzmax | mxSetPr |
© 1994-2005 The MathWorks, Inc.