MATLAB: Use a Matlab function to generate a 5×5 matrix containing random numbers between 1 and 30.

matrixrandom

which Matlab function can i use to generate a 5×5 matrix containing random numbers between 1 and 30. ? example please.

Best Answer

Try
r = 1 + 29 * rand(5, 5);