| MATLAB Compiler | ![]() |
void SetData(<numeric-type>* buffer, int len)
Copy data from supplied numeric buffer into array.
C++ syntax
#include "mclcppclass.h" double rdata[4] = {1.0, 2.0, 3.0, 4.0}; double data_copy[4] ; mwArray a(2, 2, mxDOUBLE_CLASS); a.SetData(rdata, 4); a.GetData(data_copy, 4);
Arguments
buffer. Buffer containing data to copy.
len. Maximum length of buffer. A maximum of len elements will be copied.
Return value
Description
Valid types for <numeric-type> are mxDOUBLE_CLASS, mxSINGLE_CLASS, mxINT8_CLASS, mxUINT8_CLASS, mxINT16_CLASS, mxUINT16_CLASS, mxINT32_CLASS, mxUINT32_CLASS, mxINT64_CLASS, and mxUINT64_CLASS. The data is copied in column-major order. If the underlying array is not of the same type as the input buffer, the data is converted to this type as it is copied. If a conversion cannot be made, an mwException is thrown.
| void GetCharData(mxChar* buffer, int len) const | void SetLogicalData(mxLogical* buffer, int len) | ![]() |
© 1994-2005 The MathWorks, Inc.