simple way of matrix array resorting
1 次查看(过去 30 天)
显示 更早的评论
I have three matrix, A, B, and C.
A = [a1 a2 a3 ...], B = [b1 b2 b3 ...], C = [c1 c2 c3 ...]
I want to create a matrix Q which look like
a1 b1 c1
a2 b2 c2
a3 b3 c3
...
What's simplist code?
Thank you.
0 个评论
采纳的回答
更多回答(2 个)
Guillaume
2019-12-12
Assuming your 3 vectors are row vectors (i.e. 1xN), then
result = [A; B; C].' %vertically concatenate then transpose
另请参阅
类别
在 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!