MATLAB: How can you create a metric using ones, zeros, eye

matrix

I would like to create matrix
3 0 0 4 4 0
0 3 0 4 4 0
1 1 3 4 4 0
1 1 2 2 2 2
I am stuck after A=zeros(4,6)

Best Answer

Just manual you can do that, as I don't find the relationships between elements. apart from just in the second row, 1 position shifting in 1st row
A=zeros(4,6);
A(1,:)=[3 0 0 4 4 0];
A(2,:)=[0 3 0 4 4 0];
A(3,:)=[1 1 3 4 4 0];
A(4,:)=[1 1 2 2 2 2];
A =
3 0 0 4 4 0
0 3 0 4 4 0
1 1 3 4 4 0
1 1 2 2 2 2