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.

 채택된 답변

Walter Roberson
Walter Roberson 2015년 10월 16일

0 개 추천

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

추가 답변 (0개)

카테고리

도움말 센터 및 File Exchange에서 Logical에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by