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

2 visualizaciones (últimos 30 días)
Matlab12
Matlab12 el 23 de Feb. de 2014
Comentada: Sabrina el 23 de Jun. de 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.

Respuesta aceptada

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

Más respuestas (0)

Categorías

Más información sobre Logical en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by