span> 2, <span class="comment">% ascending</span>
0064     Mod.nx=(1:K)+refx-1;Mod.ny=(1:K)+refy-1;
0065 <span class="keyword">case</span> 1, <span class="comment">% complicating</span>
0066     Mod.nx=round(min(diff(Mod.z)/Mod.dx+1,Mod.z(2:end)/Mod.dx));
0067     Mod.ny=round(min(diff(Mod.z)/Mod.dy+1,Mod.z(2:end)/Mod.dy));
0068     Mod.nx=max(Mod.nx,round(refx.*((0:K-1)*0.13+1)));
0069     Mod.ny=max(Mod.ny,round(refy.*((0:K-1)*0.13+1)));    
0070     <span class="keyword">for</span> k=1:length(Mod.nx)-1,
