How to make one matrix?
Show older comments
Hi
I have 100 arrays i.e. each have one row and diffrent columns (say size is A = 1 * 167 and B = 1 * 189 and so on). I want to make one matrix in way that the first row is A, second row is B and so on... But the columns will remain different. How can I do it?
4 Comments
Benjamin Thompson
on 28 Jan 2024
Like this?
>> A = [1 2 3 4]
A =
1 2 3 4
>> B = [5 6 7 8]
B =
5 6 7 8
>> C = [A; B]
C =
1 2 3 4
5 6 7 8
If this is not right please explain more what output you want. Perhaps with a smaller example of 4 arrays what will the output look like?
No, like this:
A = [1 2 3 4]
B = [5 6 7 ]
C = [A; B]
Ahmed
on 29 Jan 2024
Accepted Answer
More Answers (0)
Categories
Find more on Creating and Concatenating Matrices 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!