r = floor(n1/10); c=floor(n2/10);% x1 = 1; x2 = r; % s = r*c; % for i = 1:10 y1 = 1; y2 = c; % for j = 1:10 if (y2=9*c) || (x1==1 || x2==r*10);% loc = find(EZ(x1:x2, y1:y2)==0); [p, q] = size(loc); pr = p/s*100; % if pr