Because they are still complex numbers
(which triggers a different plot type
for which all zero Y coords may fail.)

   datatype 12 o."1 0 j./2 3 4 [EMAIL PROTECTED] 0
complex

(Which is a question in and of itself:
why 12 o. is a complex type?)

So can either the real part 

   plot [EMAIL PROTECTED] o."1 0 j./2 3 4 [EMAIL PROTECTED] 0

or get angle with a different promitive
with real result:

   plot {:@*. j./2 3 4 [EMAIL PROTECTED] 0

   datatype {:@*. j./2 3 4 [EMAIL PROTECTED] 0
floating


--- Graham Parkhouse <[EMAIL PROTECTED]> wrote:

> I'm doing some engineering in J, but I'm a novice. Please could someone help
> me.
> 
> I need to be able to plot phase angles etc from complex results and find
> 
>    load 'plot'
>    a=:j./?2 3 3$7                NB. Random complex array
>    a
>   1   5 3j3
> 5j3 2j6 1j2
> 0j6 5j4 6j1
>    12 o."1 0 a                   NB. Their phase angles
>       0        0 0.785398
> 0.54042  1.24905  1.10715
>  1.5708 0.674741 0.165149
>    plot 12 o."1 0 a              NB. Plot them
> |domain error: glcmds
> |       glcmds buf
> 
>    NB. Problem!
> 
>    b=:12 o."1 0 a
>    plot b
> |domain error: glcmds
> |       glcmds buf
> 
>    NB. Still got a problem!
> 
>    plot |b
> 
>    NB. This works! Why?
> 
> Enlightenment will be much appreciated. Thanking you in anticipation.
> 
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to