August 25, 2015
% test matrix >> A = [1 2 3 4 5; 6 7 8 9 10; 11 12 13 14 15; 16 17 18 19 20; 21 22 23 24 25] A = 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 % downshift matrix >> D = [0 0 0 0 1; 1 0 0 0 0; 0 1 0 0 0; 0 0 1 0 0; 0 0 0 1 0] D = 0 0 0 0 1 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 % downshift test >> D*A ans = 21 22 23 24 25 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 % downshift twice >> D*D*A ans = 16 17 18 19 20 21 22 23 24 25 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 % the trace of downshift is merely upshift >> D' ans = 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 1 0 0 0 0 % which can be verified as follows: >> A, D'*A A = 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 ans = 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 1 2 3 4 5 % putting the input matrix to the left of the downshift matrix. % then it became a left-shift operation. >> A*D ans = 2 3 4 5 1 7 8 9 10 6 12 13 14 15 11 17 18 19 20 16 22 23 24 25 21 %% Combining together, D'*A*D is down-and-left shift. >> D'*A*D A = 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 ans = 7 8 9 10 6 12 13 14 15 11 17 18 19 20 16 22 23 24 25 21 2 3 4 5 1
Comments Off on Downshift and Upshift Matrix
no comment until now