[atts, cls] = genData;
indices = crossvalind('Kfold', cls, 100);
cp = classperf(cls);
for i = 1:100
    test = (indices == i);
    train = ~test;
    class = classify(atts(test,:),
        atts(train,:),cls(train,:));
    classperf(cp,class,test);
end
cp.ErrorRate
