matlab mxsetimagdata函数语法

发表matlab mxsetimagdata函数相关文章
一句话说明: Set pointer to imaginary data elements in array

mxSetImagData (C and Fortran)

Set pointer to imaginary data elements in array

C Syntax

#include "matrix.h"
void mxSetImagData(mxArray *pm, void *pi);

Fortran Syntax

subroutine 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 memory. Do not use the ANSI® C calloc function, which can cause memory alignment issues leading to program termination. If pi points to static memory, memory errors will result when the array is destroyed.


mxSetImagData is like mxSetPi, except that in C, its pi argument is a void *. Use this function 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 the following examples in matlabroot/extern/examples/mx.

See Also

mxCalloc, mxFree, mxGetImagData, mxSetPi


与matlab mxsetimagdata用法相关的文章

友情链接It题库(| 版权归yishouce.com所有| 友链等可联系|粤ICP备16001685号-1