Simple solution to manuplate matrix
显示 更早的评论
consider i have matrix A=[1 2 3 4 5 6 7 8 9 ]; B=[9 8 7]; i want to add them in such a way that C= A+B = [1 2 3 4 5 6 ,9 8 7]; i used the for loop but it takes too much processing time wonder if there is qa simple solution to this
as=size(A); bs=size(B); for r= 1: as(2)-bs(2); cs(1,r)=A(1,r); end C=[cs,B];
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Introduction to Installation and Licensing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!