How do I create a Matlab 10x10 matrix of numbers 1-100?

2 views (last 30 days)
How do I create a Matlab 10x10 matrix that contains the numbers 1-100 in column major form? I am not allowed to use the colon operator more than four times.

Accepted Answer

Raza Ali
Raza Ali on 23 Feb 2014
A=reshape(1:100,10,10)
or
A=reshape(1:100,10,10)'

More Answers (0)

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!