How to add constant values above and below of each columns of a matrix?
5 次查看(过去 30 天)
显示 更早的评论
Hello,
I have a matrix say VP of size 100 * 106 and I want to add 50 constant values above and 50 values belowhis matrix (50 values on each column above and below) . How can I do it?
0 个评论
采纳的回答
Kevin Holly
2022-11-4
VP = rand(100,106);
extra50 = rand(50,106);
NewVP = [extra50;VP;extra50];
size(VP)
size(NewVP)
更多回答(0 个)
另请参阅
类别
在 Help Center 和 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!