External Interfaces/API Reference    
mxSetData

Set pointer to data

Fortran Syntax

Arguments

pm
   Pointer to an mxArray.

pr
   Pointer to the first element of an array. Each element in the array contains the real component of a value. The array must be in dynamic memory; call mxCalloc to allocate this dynamic memory.

Description

Use mxSetData to set the real data of the specified mxArray.

All mxCreate* calls allocate heap space to hold real data. Therefore, you do not ordinarily use mxSetData to initialize the real elements of a freshly created mxArray. Rather, you call mxSetData to replace the initial real values with new ones.

Free the memory used by pr by calling mxDestroyArray to destroy the entire mxArray.

mxSetData is equivalent to using mxSetPr.

See Also

mxSetImagData, mxGetData, mxGetImagData, mxSetPr


  mxSetCell mxSetDimensions