function test clc; matPos = csvread('pos.dat'); noPos= size(matPos,1); noFeature = size(matPos,2); labelPos= ones(noPos,1); % matPos= [matPos labelPos ]; matNeg = csvread('neg.dat'); noNeg= size(matNeg,1); labelNeg= -1*ones(noNeg,1); % matNeg= [matNeg labelNeg ]; % svmStruct = svmtrain(featureInTrain,featureOutTrain,'kernel_function','linear' , 'options' ,smo_opts); %,'rbf_sigma',100,'boxconstraint',25 noFold=5; c = cvpartition([labelPos ; labelNeg],'kfold', noFold); strArray = java_array('java.lang.String', 2); strArray(1) = java.lang.String('1'); strArray(2) = java.lang.String('-1'); myorder = cell(strArray) f = @(xtr,ytr,xte,yte) confusionmat(yte,@(xtr,ytr,xte)crossfun(xtr,ytr,xte, exp(z(1)),exp(z(2))),'order', [1 -1] ); cfMat = crossval(f,[matPos; matNeg], [ labelPos ; labelNeg],'partition',c); cfMat = reshape(sum(cfMat),3,3) minfn = @(z)crossval('mcr',[matPos; matNeg...