This add-in allows you to define and manipulate complex numbers in JMP as in Microsoft Excel.
This is an updated version that fixes a bug in 'IMDIV()' (see below).
Yet another updated version that makes IMARGUMENT() adhere to the same convention as Excel.
I haven't been able to get the IMDIV or IMPRODUCT to work with 2 columns of complex numbers. Can you share an example of those two functions?
Sorry for the delay. It turns out that I made a slip with IMDIV(), but IMPRODUCT() worked. Many thanks for drawing my attention to this. I've posted an updated version which fixes the bug and has expanded demo data.
To call the two functions you mention from JSL, you can do, for example:
// Define two complex numbers
c1 = Complex:COMPLEX(3, 13);
c2 = Complex:COMPLEX(7, 17);
c3 = Complex:IMPRODUCT(c1, c2);
c4 = Complex:IMDIV(c1, c2);
(assuming you have the add-in installed and activated).
Please do let me know if you see other issues.
Much thanks for creating this addin and for fixing the IMDIV. I believe I also found another issue with the IMARGUMENT. Here is the result from Excel-
0.0000334195551752625-0.00106342748862603i = -1.53938
Here is the result from the Addin-
0.0000334195551752625-0.00106342748862603i = 6.2517693806
Much thanks for your help in fixing this.
Thanks once again, Gareth. The version above follows the Excel convention for calculating IMARGUMENT() values.