I have a MATLAB function that calculates wave phases using a -j in a multiplication statement. When I compile this into a C++ shared library I get an error that complex integer arithmetic is not supported. I tried substituting complex(0,-1) for -j, but that results in the same error.
Is there any workaround for this?
EDIT: It's MATLAB 7.11.0(R2010b) I'm running it on Windows XP (32 bit.)
I'm able to compile the matlab code into a C++ shared library. The matlab code doesn't do any I/O operations – that is all handled by the c++ natively and then passed into the matlab functions. The compiled library will throw an exception when it hits the complex arithmetic. Using the mclGetLastErrorMessage function I see that the error is "Error using ==> times Complex integer arithmetic is not supported." and then a pointer to the line of the MATLAB file where I use -j.
Best Answer