Row major order matrix
8 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Im trying to create a 11x11 matrix in column matrix order using numbers 1-121 but i cannot figure out how to do it. I'm trying to use the ones and zeros command and transpose and similar functions.
0 Kommentare
Antworten (1)
Andrei Bobrov
am 15 Okt. 2015
Bearbeitet: Andrei Bobrov
am 16 Okt. 2015
out = bsxfun(@plus,1:11:111,(0:10)')
or
out = reshape(1:121,11,[]);
or
out = zeros(11);
out(:) = 1:121;
1 Kommentar
Siehe auch
Kategorien
Mehr zu Creating and Concatenating Matrices finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!