| MATLAB Compiler | ![]() |
mwArray Imag()
Return mwArray that references imaginary part of complex array.
C++ syntax
#include "mclcppclass.h" double rdata[4] = {1.0, 2.0, 3.0, 4.0}; double idata[4] = {10.0, 20.0, 30.0, 40.0}; mwArray a(2, 2, mxDOUBLE_CLASS, mxCOMPLEX); a.Real().SetData(rdata, 4); a.Imag().SetData(idata, 4);
Arguments
Return value
An mwArray referencing the imaginary part of the array.
Description
Use this method to access the imaginary part of a complex array. The returned mwArray is considered real and has the same dimensionality and type as the original.
| mwArray Real() | void Set(const mwArray& arr) | ![]() |
© 1994-2005 The MathWorks, Inc.