Note that (plot 5 13) looks different from (plot 5j0 13j0) even if they are equal: (5 13 -: 5j0 13j0). The error message is however a bug.
plot %:@:(* +)3j4 12j5 |domain error: glcmds | glcmds buf Venlig hilsen, Bo. Den 2:50 lørdag den 4. oktober 2014 skrev Henry Rich <henryhr...@nc.rr.com>: > > >Yes. Complex numbers plot differently (they are assumed to be x,y pairs) > >If you take the real part, using 9&o., it should work. Better to use norm2. > >Henry Rich > >On 10/3/2014 7:24 PM, Vijay Lulla wrote: >> When I tried it I got the following: >> >> datatype norm1 3j4 12j5 >> >> complex >> >> datatype norm2 3j4 12j5 >> >> floating >> >> >> Maybe this could be the issue? >> >> >> On Fri, Oct 3, 2014 at 7:16 PM, bill lam <bbill....@gmail.com> wrote: >> >>> I forwarded this to J forum because I have no real knowledge of plot. >>> ---------- Forwarded message ---------- >>> From: "Andrey Paramonov" <andrey.paramo...@gmail.com> >>> Date: Oct 4, 2014 7:07 AM >>> Subject: Plotting magnitudes of complex numbers in J >>> To: <bbill....@gmail.com> >>> Cc: >>> >>> Hi Bill, >>> >>> For some reason my message to programm...@jsoftware.com doesn't go >>> through, so I thought I can shoot you an email with some strange >>> behaviour (bug?) I see in the plot function. Here is the snippet that >>> highlights the problem >>> >>> norm1=: %:@:(* +) >>> norm2=: | >>> norm1 3j4 12j5 >>> 5 13 >>> norm2 3j4 12j5 >>> 5 13 >>> load 'plot' >>> plot norm2 3j4 12j5 NB. works >>> plot norm1 3j4 12j5 NB. does NOT work >>> >>> I thought you might find it interesting. >>> >>> Thank you, >>> Andrey >>> >>> P.S. I'm using j64-802. >>> ---------------------------------------------------------------------- >>> 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