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

2 visualizaciones (últimos 30 días)
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

Respuesta aceptada

the cyclist
the cyclist el 5 de Jun. de 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.

Más respuestas (0)

Categorías

Más información sobre Matrices and Arrays en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by