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

Réponses (1)

James Tursa
James Tursa le 22 Mar 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

Catégories

En savoir plus sur Write C Functions Callable from MATLAB (MEX Files) dans Centre d'aide et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by