MATLAB: How to create a matrix that is 10 by 10, with only integers of 1,2, and 3? and also create it randomly with these integers.

homework

I need to create a random matrix with numbers 1,2 and 3 into a 10 by 10 matrix.

Best Answer

randi(3, 10, 10)