Standard arithmetic operators and interleaved complex numbers in mex
Ältere Kommentare anzeigen
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
Antworten (1)
James Tursa
am 22 Mär. 2018
0 Stimmen
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
Kategorien
Mehr zu Write C Functions Callable from MATLAB (MEX Files) finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!