# Tutorial Complex

Jump to navigation
Jump to search

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.