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.

 Accepted Answer

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

More Answers (0)

Categories

Community Treasure Hunt

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

Start Hunting!