Standard arithmetic operators and interleaved complex numbers in mex

Hello,
sorry if this is a duplicate. I tried to ask this question before, but I am not able to find it anymore.
I would like to know (before I update to r2018a) if it is possible to use arithmetic operators (like +,-,*,/) in a similiar way than in c99.
E.g. for complex x,y and z:
z = x + y;
z = x * y;
z = x / y;
z = x - y;
Thanks a lot for you help
Christopher

Respuestas (1)

James Tursa
James Tursa el 22 de Mzo. de 2018
It looks like you need to work with the real & imag data elements individually from this page of the doc:
https://www.mathworks.com/help/matlab/matlab_external/handling-complex-data-c.html

Categorías

Más información sobre Write C Functions Callable from MATLAB (MEX Files) en Centro de ayuda y File Exchange.

Productos

Preguntada:

el 16 de Mzo. de 2018

Respondida:

el 22 de Mzo. de 2018

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by