Standard arithmetic operators and interleaved complex numbers in mex
Show older comments
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
Answers (1)
James Tursa
on 22 Mar 2018
0 votes
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
Categories
Find more on Write C Functions Callable from MATLAB (MEX Files) in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!