Newsgroups: comp.lang.apl
Path: watmath!watserv1!utgpu!cs.utexas.edu!wupost!uunet!psinntp!newstand.syr.edu!lynx.cat.syr.edu!bli
From: bli@lynx.cat.syr.edu (Bin Li)
Subject: A Question on Matrix Transformation Using J.
Message-ID: <1992Feb11.035405.19452@newstand.syr.edu>
Organization: Syracuse University
Date: Tue, 11 Feb 92 03:54:04 EST

    
Given a matrix a,

           1 2 3
           4 5 6
           7 8 9 

I want to shift each element to its left by 1 position and produce 
something like this

           2 3 0
           5 6 0
           8 9 0

The following operation will do it

          |:(0 (0)}|:(1|."1 a))

, but seems to be a bit cumbersome.  Are there better ways to do it?

Thanks.


Bin Li
Syracuse U.

