 class="keyword">return</span>
0027 <span class="keyword">end</span>
0028 
0029 [m,n,o]=size(x);
0030 
0031 mx=max(<a href="nt_unfold.html" class="code" title="function x=nt_unfold(x)">nt_unfold</a>(x));
0032 mn=min(<a href="nt_unfold.html" class="code" title="function x=nt_unfold(x)">nt_unfold</a>(x));
0033 
0034 x1=repmat(mx,[m,1,o])-x; <span class="comment">% zero for clipped, pos for OK</span>
0035 x1=min(x1,[],2); <span class="comment">% min over channels</span>
0036 x2=x-repmat(mn,[m,1,o]); <span clas