Tutorial Complex

From Efficient Java Matrix Library
Revision as of 22:16, 17 May 2017 by Peter (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Most real operations in EJML have a complex analog. For example, CommonOps_DDRM has the complex equivalent of CommonOps_ZDRM. ZMatrixRMaj is the complex analog for DMatrixRMaj. Floats are also support, e.g. FDRM -> CDRM. See tutorial on procedural interface for a table of suffixes.


The following specialized functions are contained inside the complex CommonOps class. They different ways to convert one matrix type into the other.

Function Description
CommonOps_ZDRM.convert() Converts a real matrix into a complex matrix
CommonOps_ZDRM.stripReal() Strips the real component and places it into a real matrix.
CommonOps_ZDRM.stripImaginary() Strips the imaginary component and places it into a real matrix.
CommonOps_ZDRM.magnitude() Computes the magnitude of each element and places it into a real matrix.

There is also Complex64F which contains a single complex number. Example Complex Math does a good job covering how to manipulate those objects.