 N=size(x,1);
0009 x1=x.'; x1=x1(ones(1,N),:,ones(1,N)); <span class="comment">%equivalent to x1=repmat(x.',[N,1,N]);</span>
0010 
0011 x2=x(:,ones(1,N), ones(1,N)); <span class="comment">%equivalent x2=repmat(x,[1,N,N]);</span>
0012 
0013 x3=zeros(1,1,N);
0014 x3(1,1,:)=x;
0015 
0016 x3=x3(ones(1,N),ones(1,N),:);<span class="comment">%equivalent x3=repmat(x3,[N,N,1]);</span>
0017 
0018 X=x1.*x2.*x3;
0019 
0020 <span class="keyword">end</span>
0021</pre></div>
<hr><address>Generated on Thu 18-Jul-2013 19:25