;
    cmax = 5;
    cmin = -5;
<span class="keyword">end</span>
<span class="comment">% X:c Y:g cg:mse</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 mse with the smallest c</span>
bestc = 0;
bestg = 0;
mse = 10^10;
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 cla