Row major order matrix
显示 更早的评论
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.
回答(1 个)
Andrei Bobrov
2015-10-15
编辑:Andrei Bobrov
2015-10-16
out = bsxfun(@plus,1:11:111,(0:10)')
or
out = reshape(1:121,11,[]);
or
out = zeros(11);
out(:) = 1:121;
1 个评论
Basem Sharafeldin
2015-10-15
编辑:Basem Sharafeldin
2015-10-15
类别
在 帮助中心 和 File Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!