Filter löschen
Filter löschen

How do I concatenate multiple arrays?

3 Ansichten (letzte 30 Tage)
Cai Chin
Cai Chin am 25 Dez. 2020
Beantwortet: Walter Roberson am 25 Dez. 2020
Hi, I am trying to concatenate multiple arrays with different numbers of rows but the same number of columns. I would like to create a new array by joining together other arrays, such that the rows are essentially added onto the other array and the columns align with the those of the other array. Say if I have an array 'A' which is a 76 x 900 double and array 'B' which is a 50x900 double, I would like it so the new array is a 126x900 double.
At the moment, the code I am using is adding on additional columns instead of new rows:
new_array = [A, B];
Any suggestions would be greatly appreciated, thanks in advance

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 25 Dez. 2020
new_array = [A; B];

Weitere Antworten (0)

Kategorien

Mehr zu Creating and Concatenating Matrices finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by