davyzhu
Advanced Member level 1
Hi all,
How to generate the shift identity matrix by its size and shift vaule?
For example,input size = 8, input shift value = 3
then, the matrix is
0 0 0 1 0 0 0 0
0 0 0 0 1 0 0 0
0 0 0 0 0 1 0 0
0 0 0 0 0 0 1 0
0 0 0 0 0 0 0 1
1 0 0 0 0 0 0 0
0 1 0 0 0 0 0 0
0 0 1 0 0 0 0 0
Any easy approach will be appreciated!
Best regards,
Davy
How to generate the shift identity matrix by its size and shift vaule?
For example,input size = 8, input shift value = 3
then, the matrix is
0 0 0 1 0 0 0 0
0 0 0 0 1 0 0 0
0 0 0 0 0 1 0 0
0 0 0 0 0 0 1 0
0 0 0 0 0 0 0 1
1 0 0 0 0 0 0 0
0 1 0 0 0 0 0 0
0 0 1 0 0 0 0 0
Any easy approach will be appreciated!
Best regards,
Davy