Alex,

Since your topic is slope you may wish to present
something along these lines, too.

   plot y1,y2,:y1-y2
   =/,= y1-y2
1
 
>Date: Mon, 21 Apr 2008 21:14:52 +1200
>From: "Sherlock, Ric" <[EMAIL PROTECTED]>
>Subject: RE: [Jgeneral] RE: n00b plotting 2 lines
>To: General forum <[EMAIL PROTECTED]>
>...
>
>If the x values are the same for all y series then
you
>only need to include it once:
>   plot h1;y1,:y2
>
>And for this example you don't need to explicitly 
>state x at all because it will default to i.#y
>   plot y1,:y2
>
>However the format you have used is more general and 
>will work for plots with different x values for each 
>y series.
>
>---Original Message-----
>> From: [EMAIL PROTECTED]
[mailto:general-
>> [EMAIL PROTECTED] On Behalf Of Alex Rufon
>> Sent: Monday, 21 April 2008 21:07
>> To: General forum
>> Subject: RE: [Jgeneral] RE: n00b plotting 2 lines
>>
>> Hi Ric,
>>
>> Thanks. I got it. I was able to plot 2 parallel
lines with your
>> example.:)
>>    h1=. i. 10
>>    y1=. 1 + 0.5 * h1 NB. y=0.5X+1
>>    y2=. _2 + 0.5 * h1 NB. -3x+6y=-12
>>    (h1,:h1);(y1,:y2)
>>
+-------------------+---------------------------------+
>> |0 1 2 3 4 5 6 7 8 9| 1  1.5  2  2.5 3 3.5 4 4.5 5
5.5|
>> |0 1 2 3 4 5 6 7 8 9|_2 _1.5 _1 _0.5 0 0.5 1 1.5 2
2.5|
>>
+-------------------+---------------------------------+
>>    plot (h1,:h1);(y1,:y2)
>>
>> r/Alex
>>


--
Tracy B. Harms
 
     A good programming language is a conceptual universe
     for thinking about programming.
                                        Alan Perlis


      
____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to