Raul, I can finally get to the problem I'm having with t. f=: 1 2 1&p. g=: 1 3 3 1&p. x=: 10%~i=: i.8 pd=: 13 :'1 2 1&p. y' pd 1 2 1&p. 5!:4 <'pd' ┌─ 1 2 1 ── & ─┴─ p. pd x 1 1.21 1.44 1.69 1.96 2.25 2.56 2.89 NB.c p. x ↔ +/c*x^i.#c from vocabulary X=:10%~I=:i.8 PD=: 13 :'+/"1 x*"1 y^/i.#x' PD [: +/"1 [ *"1 ] ^/ [: i. [: # [ 5!:4 <'PD' ┌─ [: │ ┌─ / ─── + ├─ " ─┴─ 1 │ ──┤ ┌─ [ │ │ ┌─ * │ ├─ " ─┴─ 1 │ │ └─────┤ ┌─ ] │ ├─ / ─── ^ │ │ └─────┤ ┌─ [: │ ├─ i. └─────┤ ┌─ [: └────┼─ # └─ [ 1 2 1 PD X 1 1.21 1.44 1.69 1.96 2.25 2.56 2.89 j=: 13 :'(f*g) y' j f * g 5!:4 <'j' ┌─ f ──┼─ * └─ g j x 1 1.61051 2.48832 3.71293 5.37824 7.59375 10.4858 14.1986 J=: 13 :'(1 2 1 PD y)*1 3 3 1 PD y' J (1 2 1 PD ]) * 1 3 3 1 PD ] 5!:4 <'J' ┌─ 1 2 1 ┌───┼─ PD │ └─ ] ──┼─ * │ ┌─ 1 3 3 1 └───┼─ PD └─ ] J X 1 1.61051 2.48832 3.71293 5.37824 7.59375 10.4858 14.1986 ]c=:j t. i 1 5 10 10 5 1 0 0 c 1 5 10 10 5 1 0 0 5!:4 <'c' ── 1 5 10 10 5 1 0 0x c 1 5 10 10 5 1 0 0 ]C=:J t. I ran with error: |rank error: scriptd | ]C=: J t.I
#$j x 1 #$J X 1 Note the little x that shows up in the tree version of c I don’t know how to insert that x in C Linda from] On Behalf Of Linda Alvord Sent: Sunday, November 04, 2012 1:31 AM To: 'Programming forum' Subject: Re: [Jprogramming] Taylor coefficients dyad You explain what ^t. does, but what does t. do? t. i.6 |syntax error | t.i. 1 t. i.6 |length error | 1 t.i.6 ^t. %@! t. t. Linda -----Original Message----- From: programming-boun...@jsoftware.com [mailto:programming-boun...@jsoftware.com] On Behalf Of Raul Miller Sent: Monday, April 04, 2011 11:31 AM To: Programming forum Cc: Zsbán Ambrus Subject: Re: [Jprogramming] Taylor coefficients dyad On Mon, Apr 4, 2011 at 10:33 AM, Zsbán Ambrus <amb...@math.bme.hu> wrote: > Let me ask some question on the builtins for Taylor coefficients. > > Firstly, I don't understand how diadic (u t.) works. Of the following > two phrases, the first one gives the correct result, and the second > one should give the same result according to the dictionary if I read > it right, but I get something else. Why? > > ^t.i.6 > 1 1 0.5 0.166667 0.0416667 0.00833333 > 1 ^t.i.6 > _ 1 0.5 0.333333 0.25 0.2 ^t. %@! This is all that t. does -- it's up to you how you use it. %@! i.6 1 1 0.5 0.166667 0.0416667 0.00833333 1 %@! i.6 _ 1 0.5 0.333333 0.25 0.2 The first sentence is an example how this mechanism was intended to be used. The second sentence is just coincidence -- the result of t. was not designed to deal with a left argument. -- Raul ---------------------------------------------------------------------- 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