MATLAB: Length of label vector does not match # of instances. Error: C <= 0 model file should be a struct array matlab

MATLABsvmtrain

load('test_set.mat')
load('train_set.mat')
train_label=[1*ones(1,6000) 2*ones(1,6000) 3*ones(1,6000) 4*ones(1,6000) 5*ones(1,6000) 6*ones(1,6000) 4*ones(1,6000) 8*ones(1,6000) 9*ones(1,6000) 10*ones(1,6000)]
model = svmtrain(train_label, train_set, '-s 0 -t 0');

Best Answer

Why don't you try
ones(6000,1)
instead of
ones(1,6000)