Error using vertcat Dimensions of arrays being concatenated are not consistent.

2 Ansichten (letzte 30 Tage)
Hi everyone. I need to use SVM for prediction. hence, i need to combine my data
data1= 22x 7
data2 = 22 x 8
I dont know how to combine these two data . I used data3=[data1;data2], it does not work . Giving the error mentioned in title

Akzeptierte Antwort

the cyclist
the cyclist am 5 Jun. 2021
data3 = [data1 data2]
will concatenate them horizontally rather than vertically. You can do that, because they have the same number of rows. You cannot do your way, because they do not have the same number of columns.

Weitere Antworten (0)

Kategorien

Mehr zu Matrices and Arrays 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