Thank you, Raul. I am very much an amateur, and I am probably exposing my ignorance. But if plot can figure out how to plot x=0 in plot j.i.5, why can it not figure out how to plot y=0 as in plot *:j.i.5? The error message is totally opaque to me. Do you have any idea what it might mean?

  plot ]&.j. 0 1 4 9 16
|domain error: glcmds
|       glcmds buf

Raul Miller wrote:
On Wed, Aug 13, 2008 at 4:15 PM, Eldon Eller <[EMAIL PROTECTED]> wrote:
Here's a funny thing:
 a=.0j0 _1j0 _4j0 _9j0 _16j0
 3!:0 a
4

Yes, J's parser reduces numbers to their simplest type.

If you want complex values you can use
  ]&.j. 0 1 4 9 16

And I remain puzzled by
the behavior of plot. If you give plot a vector of complex numbers, it
appears to plot the imaginary part vs. the real part, and it does not mind
if the real parts = 0; j.i.5 is plotted as x=0. Given that b is complex with
the imaginary parts = 0, why does it not plot y=0 instead of failing?

I think it's trying to figure out how to scale the y axis.

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

Reply via email to