an class="comment">% X:c Y:g cg:accuracy</span>
[X,Y] = meshgrid(cmin:cstep:cmax,gmin:gstep:gmax);
[m,n] = size(X);
cg = zeros(m,n);
<span class="comment">% record accuracy with different c &amp; g,and find the best accuracy with the smallest c</span>
bestc = 0;
bestg = 0;
bestacc = 0;
basenum = 2;
<span class="keyword">for</span> i = 1:m
    <span class="keyword">for</span> j = 1:n
        cmd = [<span class="string">'-v '</span>,num2str(v),<span class="string">' -c '</span>,num2str( basenum^X(i,j) ),<span