rotate =: |."0 1
1 0 2 0 rotate >'cat';'dog';'hen';'cow'
atc
dog
nhe
cow
At 17:34 +0100 2010/09/05, Romilly Cocking wrote:
>I'm looking for a J expression which will rotate each row of a matrix by a
>different amount (specified in a vector).
>
>In other words, I'd like
>
>1 0 2 0 rotate >'cat';'dog';'hen';'cow'
>to give
>
>atc
>dog
>nhe
>cow
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
- [Jprogramming] Equivalent of APL rotate Romilly Cocking
- Re: [Jprogramming] Equivalent of APL rotate Brian Schott
- Re: [Jprogramming] Equivalent of APL rotate Joey K Tuttle
- Re: [Jprogramming] Equivalent of APL rotate Roger Hui
