| MATLAB® | ![]() |
#include "matrix.h" mxArray *mxDuplicateArray(const mxArray *in);
mwPointer mxDuplicateArray(in) mwPointer in
Pointer to the mxArray you want to copy
Pointer to a copy of the array.
mxDuplicateArray makes a deep copy of an array, and returns a pointer to the copy. A deep copy refers to a copy in which all levels of data are copied. For example, a deep copy of a cell array copies each cell and the contents of each cell (if any), and so on.
See
mexget.c in the mex subdirectory of the examples directory
phonebook.c in the refbook subdirectory of the examples directory
For additional examples, see mxcreatecellmatrix.c, mxgetinf.c, and mxsetnzmax.c in the mx subdirectory of the examples directory.
![]() | mxDestroyArray (C and Fortran) | mxFree (C and Fortran) | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |