N=input('input size of matrix N*N give N = ');for i=1:NA=[i*ones(1,N)]end
the result is input size of matrix N*N give N = 3
A =
1 1 1
A =
2 2 2
A =
3 3 3
but I want A =
1 1 1 2 2 2 3 3 3
Best Answer