How do I create a vector by repeating a vector
显示 更早的评论
Given a Vector A=[1; 2], I want to create a vector B, such that B=[1; 2; 1; 2] . Thanks
回答(1 个)
A = [1; 2] ;
B = repmat(A,2,1)
类别
在 帮助中心 和 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!
