 of layers),</span>
0007 <span class="comment">% dx/dy (smallest spacing) are optional</span>
0008 
0009 <span class="keyword">if</span> nargin&lt;2, nz=[]; <span class="keyword">end</span>
0010 <span class="keyword">if</span> nargin&lt;3, dx=[]; <span class="keyword">end</span>
0011 <span class="keyword">if</span> nargin&lt;4, dy=dx; <span class="keyword">end</span>
0012 
0013 <span class="keyword">if</span> isempty(nz),
0014     nz=length(unique(sort(round(N.k))));
0015     <span class="keyword">if</span>