For example, if:
a =
1 2 3 4 4 5 6 7 7 8 9 0
and I perform the operation b = diag(diag(a,1),1)
I get: b =
0 2 0 0 0 0 6 0 0 0 0 0 0 0 0 0
but I want this matrix: b =
0 2 0 0 0 0 6 0 0 0 0 0
so be and a have the same dimensions. Thanks
Best Answer