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

2 Ansichten (letzte 30 Tage)
Matlab12
Matlab12 am 23 Feb. 2014
Kommentiert: Sabrina am 23 Jun. 2017
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.

Akzeptierte Antwort

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

Weitere Antworten (0)

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by