 class="string">' -g '</span>,num2str( basenum^Y(i,j) )];
        cg(i,j) = svmtrain(train_label, train, cmd);

        <span class="keyword">if</span> cg(i,j) &gt; bestacc
            bestacc = cg(i,j);
            bestc = basenum^X(i,j);
            bestg = basenum^Y(i,j);
        <span class="keyword">end</span>
        <span class="keyword">if</span> ( cg(i,j) == bestacc &amp;&amp; bestc &gt; basenum^X(i,j) )
            bestacc = cg(i,j);
            bestc = basenum^X(i,j);
            bestg = basenum^