If it is just number such as (1,2,3,4,5), and add those number into the end of matrix A, still make matrix A become 17x5, what should I do? Thanks.
How can I add a matrix into another matrix
4 views (last 30 days)
Show older comments
Hi, I am wondering of there is a function that enables me to insert a matrix B 1x5, into matrix A 16x5 and make matrix A become 17x5. Also can I use fprintf to make this output? Thanks.
2 Comments
Answers (1)
madhan ravi
on 15 Sep 2019
A = [A;B]
help fprintf
doc fprintf
2 Comments
Image Analyst
on 15 Sep 2019
In general, what if he wants to insert it, instead of append it?, like say insert it between rows 3 and 4?
See Also
Categories
Find more on Matrix Indexing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!