# Difference between revisions of "Tutorial Complex"

From Efficient Java Matrix Library

m (Peter moved page Complex Math to Tutorial Complex) |
|||

Line 1: | Line 1: | ||

− | + | 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|procedural interface]] for a table of suffixes. | |

− | |||

− | |||

− | |||

− | |||

− | |||

− | |||

− | |||

− | |||

− | |||

− | |||

− | |||

− | |||

− | |||

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

{| class="wikitable" | {| class="wikitable" | ||

! Function !! Description | ! 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. | There is also Complex64F which contains a single complex number. [[Example Complex Math]] does a good job covering how to manipulate those objects. |

## Latest revision as of 22:16, 17 May 2017

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.