Now I can make Some complex Holiday Ornaments. Can you create some
interesting ones starting with A?
load 'viewmat'
RGB=:( #:i.8){0 255
GRB=:1 0 2{"1 RGB
]A=:(i:10)j./i:10
B=:7*10=10 o. A
C=:4*10>10 o. A
]D=:B+C
RGB viewmat D
GRB viewmat D
Linda
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Linda Alvord
Sent: Friday, November 28, 2014 11:18 PM
To: [email protected]
Subject: Re: [Jprogramming] Better way to locate coomplex or real numbers in
an array
Thanks. Linda
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Henry Rich
Sent: Friday, November 28, 2014 10:34 PM
To: [email protected]
Subject: Re: [Jprogramming] Better way to locate coomplex or real numbers in
an array
]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
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm