Plot a list of vectors:

  'color blue' plot (_2 ]\ 1 2 3 4 5 6) ; (_2 ]\ 3 1 4 1 5 9)

Henry Rich

On 8/8/2011 3:57 AM, nykkyo Kane wrote:
> I got it working and found out "#" does the same thing,  I have all I need 
> except how to plot multiple line segments (using plot) on the same graph.  In 
> other words, how ro plot a vector field on a plane.
>
>   Thanks again.
>
> From: mijj<[email protected]>
> To: Programming forum<[email protected]>
> Sent: Monday, August 8, 2011 12:22 AM
> Subject: Re: [Jprogramming] value error
>
> hi Mr Kane..
>
> from a novice perspective (having come from those pitfalls only
> recently) i notice (as well as the assignment lapse, which i continjue
> to do all the time) 2 errors in the use of :[ return ]:
>
> i.e...
> :[ return t ]: should actually be :[ t return. ]: for it to work as i'm
> guessing you expect (returning the value "t"?).
>
> First problem... missing :[ . ]: from the end of "return".
>
> Second... :[ return. t ]: wouldn't return the value "t" after it.  It
> would quit immediately returning the most recent expressed value
> *before* the return. So, if you want to return the value "t" ... :[ t
> return. ]:
>
> ........
> (nb.^:1) i like to use :[ return. ]: as an explicit marker to help with
> cursory examination of a construction.  I don't know if a superfluous :[
> return. ]: has a performance penalty, but until i create something where
> it makes a difference, i find it useful.
>
>
> (nb.^:2) i'm toying with using :[ ... ]: in emails to isolate bits of J
> within text to make it stand out.  I've not decided yet if it looks too
> silly to continue using.)
>
>
> On 2011-08-08 03:56, nykkyo Kane wrote:
>> Following is a creenshot of my "J" console.  I do not understand why I am 
>> getting a error>
>> =================
>> compress 4 : 0
>> i =. 0
>> t =. 0$0
>> while. i<   $x  do.
>>    if. 1 = i{x do. t =. t , i{y end.
>>    i =.>:i
>> end.
>> return t
>> )
>>
>>        compress 4 : 0
>> i =. 0
>> t =. 0$0
>> while. i<   $x  do.
>>    if. 1 = i{x do. t =. t , i{y end.
>>    i =.>:i
>> end.
>> return t
>> )
>>      b compress a
>> |value error: compress
>> |  b    compress a
>>      a
>> 11 12 13 14 15 16 17 18 19 20
>>      b
>> 1 0 1 0 1 0 1 0 1 0
>> ----------------------------------------------------------------------
>> 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

Reply via email to