Is there any inline command to generate shifted identity matrix in MATLAB?
A=[ ... 0, 1, 0, 0, 0, 0, 0, 0, 0, 0 0, 0, 1, 0, 0, 0, 0, 0, 0, 0 0, 0, 0, 1, 0, 0
Here is another one (also works with negative shifts)
rot90(blkdiag(zeros(abs(shift)),rot90(eye(n))),sign(shift))