]A=:(i:2)j./i:2
_2j_2 _2j_1 _2 _2j1 _2j2
_1j_2 _1j_1 _1 _1j1 _1j2
 0j_2  0j_1  0  0j1  0j2
 1j_2  1j_1  1  1j1  1j2
 2j_2  2j_1  2  2j1  2j2
   (0 ~: 11&o.) A
1 1 0 1 1
1 1 0 1 1
1 1 0 1 1
1 1 0 1 1
1 1 0 1 1

Henry Rich

On 11/28/2014 10:27 PM, Linda Alvord wrote:
A is an array of real and complex numbers.  Is there an easier way to locate
all the complex numbers.  Signum locates each numbers intersection with a
line from it to the origin and the circle.



    ]A=:(i:2)j./i:2

_2j_2 _2j_1 _2 _2j1 _2j2

_1j_2 _1j_1 _1 _1j1 _1j2

0j_2 0j_1 0 0j1 0j2

1j_2 1j_1 1 1j1 1j2

2j_2 2j_1 2 2j1 2j2



    *A

_0.707107j_0.707107 _0.894427j_0.447214 _1 _0.894427j0.447214
_0.707107j0.707107

_0.447214j_0.894427 _0.707107j_0.707107 _1 _0.707107j0.707107
_0.447214j0.894427

0j_1 0j_1 0 0j1 0j1

0.447214j_0.894427 0.707107j_0.707107 1 0.707107j0.707107 0.447214j0.894427

0.707107j_0.707107 0.894427j_0.447214 1 0.894427j0.447214 0.707107j0.707107



    -.(*A)e. _1 0 1

1 1 0 1 1

1 1 0 1 1

1 1 0 1 1

1 1 0 1 1

1 1 0 1 1



I am looking for the best way to locate all the complex numbers.



Linda

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to