Our World Statistics Day conversations have been a great reminder of how much statistics can inform our lives. Do you have an example of how statistics has made a difference in your life? Share your story with the Community!
Choose Language Hide Translation Bar

Complex Numbers

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.


Hi Ian,

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);

// Multiplication

c3 = Complex:IMPRODUCT(c1, c2);

// Division

c4 = Complex:IMDIV(c1, c2);

Print(c3, c4);

(assuming you have the add-in installed and activated).

Please do let me know if you see other issues.

Hi Ian,

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.

Article Labels

    There are no labels assigned to this post.

Article Tags