function ave=deal(ji) ave=ji; minn=min(min(ave)); re=(-1)*minn+10; [m,n]=size(ji); for i=1:m for j=1:n if ji(i,j)>(-0.0001)&&ji(i,j)<0.0001 jii(i,j)=0; else jii(i,j)=ji(i,j); end end end for i=1:m for j=1:n if jii(i,j)==0 ave(i,j)=jii(i,j); else ave(i,j)=jii(i,j)+re; end end end