MATLAB: How to create a (10,10) matrix containing numbers from 1 to 100

MATLABmatrix

How do I create a (10,10) matrix containing numbers from 1 to 100?
I just want the numbers to go 1 to 10 on the top row, then 11-20 on the 2nd row etc.

Best Answer

reshape( 1:100, 10, 10) .'