How does this vector expanding work?
显示 更早的评论
Good night, I'm trying to understand how a vector can expand to a matrix using a vector formed by ones. Here is the example I'm trying to understand:
xx = [1 2 3]; yy = xx(ones(3,1),:);
I don't know how the part of xx(ones(3,1),:) works, and it would be great if you could explain it to me. The result of this operations is a 3x3 matrix:
1 2 3
1 2 3
1 2 3
Thank you!
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!