| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → MATLAB |
| Contents | Index |
| Learn more about MATLAB |
#include "matrix.h" void mxSetImagData(mxArray *pm, void *pi);
mxSetImagData(pm, pi) mwPointer pm, pi
Pointer to an mxArray
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 errors will result when the array is destroyed.
mxSetImagData is similar to mxSetPi, except that in C, its pi argument is a void *. Use this on numeric arrays with contents other than double.
This function does not free any memory allocated for existing data that it displaces. To free existing memory, call mxFree on the pointer returned by mxGetImagData before you call mxSetImagData.
See mxisfinite.c in the matlabroot/extern/examples/mx folder .
mxCalloc, mxFree, mxGetImagData, mxSetPi
![]() | mxSetFieldByNumber (C and Fortran) | mxSetIr (C and Fortran) | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |