im,<br>
&nbsp;&nbsp;&nbsp;&nbsp;S(i,j)&nbsp;=&nbsp;(model.sv.X(i,:).*model.sv.X(j,:)&nbsp;)*model.Alpha(:);<br>
&nbsp;&nbsp;&nbsp;&nbsp;S(j,i)&nbsp;=&nbsp;S(i,j);<br>
&nbsp;&nbsp;<span class=keyword>end</span><br>
<span class=keyword>end</span><br>
<br>
[V,D]&nbsp;=&nbsp;eig(S);<br>
D=real(diag(D));<br>
[dummy,inx]&nbsp;=&nbsp;sort(-abs(D));<br>
D=D(inx);<br>
V=V(:,inx);<br>
<br>
inx&nbsp;=&nbsp;find(D&nbsp;~=&nbsp;0);<br>
<br>
red_model.nsv&nbsp;=&nbsp;length(inx);<br>
red_model.Alpha&nbsp;=&nbsp;zeros(red