Code: Select all
while (n < npass && max(max(r)) > rlim),
hsmth=shapiro2(hout,order,2);
r=rfactor(hsmth,rmask);
ind=find(r < rlim);
if (~isempty(ind)),
hout(ind)=hsmth(ind);
n=n+1;
else
break;
end,
end,
Code: Select all
while (n < npass && max(max(r)) > rlim),
hsmth=shapiro2(hout,order,2);
r=rfactor(hsmth,rmask);
Nx = size(r)(2);
Ny = size(r)(1);
for i=1:Nx,
for j=1:Ny,
if (r(j,i) > rlim),
if (j < Ny-2 & i < Nx-2)
hout(j+1,i) = hsmth(j+1,i);
hout(j+1,i+1) = hsmth(j+1,i+1);
hout(j ,i) = hsmth(j ,i);
hout(j ,i+1) = hsmth(j ,i+1);
elseif (j < Ny-2 & i == Nx-2) % right edge
hout(j,i) = hsmth(j,i);
hout(j+1,i) = hsmth(j+1,i);
elseif (j == Ny-2 && i < Nx-2) % top
hout(j,i) = hsmth(j,i);
hout(j,i+1) = hsmth(j,i+1);
else % upper right corner
hout(j,i) = hsmth(j,i);
endif
endif
end
end
n=n+1;
end,