I'm really struggling here, I can't seem to figure out how to create an 11x11 matrix with the numbers 1-121 in row major order and column major order. I cannot use the reshape command, and I am trying to work with ones, zeros, transpose, cumsum, cumprod, and several other similar commands. I really can't figure it out.

 Respuesta aceptada

Walter Roberson
Walter Roberson el 16 de Oct. de 2015

0 votos

A = zeros(11,11);
A(:) = 1 : 121;

Más respuestas (0)

Categorías

Más información sobre Creating and Concatenating Matrices en Centro de ayuda y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by