creating a matrix using integers and other matrices

so let's say that I have two 1x3 matrices, a & b, and I want to create another matrix, c, where c is [1,2,a;3,4,b], such that c is a 2x5 matrix, how can I do that?

回答(1 个)

Exactly what you have already written:
c = [1,2,a;3,4,b];
What am I missing?

1 个评论

I'm sorry, I just had to transpose a & b. Thank you for taking the time to answer my dumb question

请先登录,再进行评论。

类别

在 帮助中心 和 File Exchange 中查找有关 Matrix Indexing 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by