Post Reply 
Matrices Built from Shifted Elements
03-06-2019, 04:32 PM
Post: #2
RE: Matrices Built from Shifted Elements
Interesting topic, another way to do it would be to use MAKEMAT like this:

Code:
EXPORT LSM(L0)
BEGIN
 LOCAL N:= SIZE(L0);
 MAKEMAT(L0((J+I-1) MOD N),N,N);   // left shift matrix
END;

EXPORT RSM(L0)
BEGIN
 LOCAL N:= SIZE(L0);
 MAKEMAT(L0((J-I+1) MOD N),N,N);   // right shift matrix
END;
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Matrices Built from Shifted Elements - Didier Lachieze - 03-06-2019 04:32 PM



User(s) browsing this thread: 1 Guest(s)