Which page was it that you found confusing? (I think that the ordering is consistent with the left-to-right top-to-bottom ordering of english text, but I don't know what you were looking at.)
-- Raul On Tue, May 10, 2022 at 4:44 PM P Padilcdx <ppadil...@gmail.com> wrote: > > Something confused me on the subject page. The shift right is only for a > vector and behaves differently for a matrix. > > |.!.f says it will shift right 1, but when I tried it on a matrix, it shifts > down. > > ]a=:4 4 $ 1 0 0 0 0 > 1 0 0 0 > 0 1 0 0 > 0 0 1 0 > 0 0 0 1 > > |.!._1 a > _1 _1 _1 _1 > 1 0 0 0 > 0 1 0 0 > 0 0 1 0 > > same as: > _1 |.!._1 a > _1 _1 _1 _1 > 1 0 0 0 > 0 1 0 0 > 0 0 1 0 > > For it to shift right it needs to identify the second axis: > > 0 _1|.!._1 a > _1 1 0 0 > _1 0 1 0 > _1 0 0 1 > _1 0 0 0 > > Anyway just thought to mention it since, at least for newbies, they might > find it confusing. > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm