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

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

A=reshape(1:100,10,10)
or
A=reshape(1:100,10,10)'

More Answers (0)

Categories

Find more on Mathematics in Help Center and File Exchange

Tags

Asked:

on 23 Feb 2014

Commented:

on 23 Jun 2017

Community Treasure Hunt

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

Start Hunting!