sa = size(cvha);
sb = size(cvhb);

if(sa(1) < sb(1))
	forhist = [cvha cvhb(1:sa(1))];
else
	forhist = [cvha(1:sb(1)) cvhb];
end

[dstrb quux] = hist(forhist, nclust)
%hist(forhist, nclust)
cverr = [];
right = 0;
wrong = 0;
for cn = 1:nclust
	if(dstrb(cn,1) > dstrb(cn,2))
		right =right +dstrb(cn,1);
		wrong = wrong +dstrb(cn,2);
	else
		right =right +dstrb(cn,2);
		wrong = wrong +dstrb(cn,1);
	end
end

blah = wrong./(right+wrong)
cverr = [cverr;blah];