Based on my understanding, you want to iterate over the first column of subimages in the order provided by the pairAvg. One workaround would be to perform cell indexing and iterate over the pairAvg array. Attaching the updated code for your reference
refback = zeros(size(SubImage{1,1}));
pairAvg = {[1 7],[7 14],[14 22],[22 29],[29 36],[36 43],[43 50],[50 57],[57 64],[64 71],[71 77]};
for i =1:length(pairAvg)
for f = pairAvg{i}(1):pairAvg{i}(2)
Imgfft = sfft(SubImage{1,f});
[siz1,siz2] = size(Imgfft);
siz1;
siz2;
SpatDog = fspecial('gaussian',siz1,0.15) - fspecial('gaussian',siz2,0.24);%%0.5,0.8
FreqDog = sfft(SpatDog);
multip = abs(FreqDog).*Imgfft;
Y = isfft(multip);%ifft2(multip);
Z = (sigmf(Y, [NL 0])*2)-1;
Z = real(Z);
refback = refback + im2double(Z);
end
refback = (1/(pairAvg{i}(2)-pairAvg{i}(1)+1)) * refback;
end