Writing a program to combine multiple arrays
显示 更早的评论
回答(2 个)
Rik
2020-5-6
You can use the square brackets to concatenate arrays, or you can use the cat function.
[A;B;C]
cat(3,A,B,C)
Deepak Gupta
2020-5-6
Hello Grace,
You can simply concate 2 or more arrays in below fasion.
If A and B are 2 row arrays and you want A being appended by B, then...
Appended_A_by_B = [A B];
Will give you this result.
If A and B are column arrays then....
Appended_A_by_B = [A; B];
There is also a function cat which can be used to concatenate arrays or matrices. You can know more about it here:
Cheers
类别
在 帮助中心 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!