Merge two vectors into matrix
388 次查看(过去 30 天)
显示 更早的评论
I have a time vector of 1x1024 double and an amplitude vector of 1024x1 double. How do I combine these vectors into a single matrix?
0 个评论
回答(3 个)
Idan Cohen
2020-4-22
Hi,
I have a similar question. I have three vectors - X, Y and Z.
How can I merge these vectors into on matris so I can plot 3-D surf graph?
Thanks.
0 个评论
Von Duesenberg
2017-1-21
Something like this?
vector1 = rand(1024,1);
vector2 = rand(1, 1024);
newVector = [vector1 vector2'];
3 个评论
Mohammed Ayoub
2018-2-7
Use "horzcat" command after transposing one of the vector. The result will be horizontally concatenates arrays. Thanks
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Discrete Data Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!