e = cg(i,j);
            bestc = basenum^X(i,j);
            bestg = basenum^Y(i,j);
        <span class="keyword">end</span>

    <span class="keyword">end</span>
<span class="keyword">end</span>

[cg,ps] = mapminmax(cg);
<span class="comment">% draw the accuracy with different c &amp; g</span>
figure;
[C,h] = contour(X,Y,cg,0:msestep:1);
clabel(C,h,<span class="string">'FontSize'</span>,10,<span class="string">'Color'</span>,<span class="string">'r'</span>);
xlabel(<span class="string">'log2c'</span>,<spa