Row major order matrix
Mostra commenti meno recenti
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.
Risposte (1)
Andrei Bobrov
il 15 Ott 2015
Modificato: Andrei Bobrov
il 16 Ott 2015
out = bsxfun(@plus,1:11:111,(0:10)')
or
out = reshape(1:121,11,[]);
or
out = zeros(11);
out(:) = 1:121;
1 Commento
Basem Sharafeldin
il 15 Ott 2015
Modificato: Basem Sharafeldin
il 15 Ott 2015
Categorie
Scopri di più su Creating and Concatenating Matrices in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!