Re: [Jprogramming] Rotate primitive

2012-09-10 Thread Roger Hui
_1 0 2 |."0 1 m 3 0 1 2 4 5 6 7 10 11 8 9 _1 0 2 |."_1 m 3 0 1 2 4 5 6 7 10 11 8 9 On Mon, Sep 10, 2012 at 12:17 AM, Gian Medri wrote: > Hi! > I want to rotate the rows in a matrix individually. > In APL it is very simple, using the primitive "phi" : > > ]m=:i. 3 4 > 0 1 2 3 >

[Jprogramming] Rotate primitive

2012-09-10 Thread Gian Medri
Hi! I want to rotate the rows in a matrix individually. In APL it is very simple, using the primitive "phi" : ]m=:i. 3 4 0 1 2 3 4 5 6 7 8 9 10 11 ¯1 0 2 "phi" m 3 0 1 2 4 5 6 7 10 11 8 9 The rotate primitive in J doesn't work in the same way, so I have done a verb with the same function