MATLAB: Use for loop to create a matrix

for loophomeworkMATLAB

how to write a pgogram to create a 4*3 matrix, and the content of each element of each row of the matrix is the index of it's row.

Best Answer

(1:4)'*[1 1 1];