Hi, I am new to the matlab coding.when iam using linear classifier to classify the test and train signal it shows' The length of GROUP must equal the number of rows in TRAINING.',and the code i have used is given below,
a=ones([1060,1]); b=zeros([1060,1]); c=cat(1,a,b);class=classify(test,train,c,'linear');SVMStruct=svmtrain(train,c); class=svmclassify(SVMStruct,test,'Showplot',true);class = knnclassify(test,train,c,1);
and
>>size(test)ans = 2 6354 size(train)ans = 2 9540>> size(c)ans = 2120 1
how can i solve this problem…?
Any response would be greatly appreciated. Thanks in advance.
Best Answer