 2004 Gabriel Peyr</span>
0012 
0013 <span class="keyword">if</span> nargin==2
0014     <span class="comment">% size specified as an array</span>
0015     q1 = p1(2);
0016     <span class="keyword">if</span> length(p1)&gt;2
0017         r1 = p1(3);
0018     <span class="keyword">else</span>
0019         r1 = size(img,3);
0020     <span class="keyword">end</span>
0021     p1 = p1(1);        
0022 <span class="keyword">end</span>
0023 
0024 <span class="keyword">if</span> nargin&lt;4
0025     r1 = size(img,3)