Matrix with two diagonals: Difference between revisions

Content added Content deleted
Line 1,389: Line 1,389:
ans =
ans =


Columns 1 through 6
Columns 1 through 7


1 0 0 0 0 0
1 0 0 0 0 0 1
0 1 0 0 0 1
0 1 0 0 0 1 0
0 0 1 0 1 0
0 0 1 0 1 0 0
0 0 0 1 0 0
0 0 0 1 0 0 0
0 0 1 0 1 0
0 0 1 0 1 0 0
0 1 0 0 0 1
0 1 0 0 0 1 0
1 0 0 0 0 0
1 0 0 0 0 0 1

Column 7

1
0
0
0
0
0
1


>> diagdiag(7, true)
>> diagdiag(7, true)