[x,y,u,v,snr]=matpiv('Demo3/mpim1b.bmp','Demo3/mpim1c.bmp',...
[128 128; 64 64; 32 32; 32 32],0.008,1,...
'multin','worldco.mat','polymask.mat');
[su,sv]=snrfilt(x,y,u,v,snr,1.3);
[gu,gv]=globfilt(x,y,su,sv,3);
[lu,lv]=localfilt(gu,gv,2.7,'median',3,'polymask.mat',x,y);
[fu,fv]=naninterp(gu,gv,'linear','polymask.mat',x,y);
We note that it is very easy to insert this piece of code into a for loop and perform a large number of calculations. We shall briefly revisit this in section 3.5.