<div style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial"><div style="font:14px/1.5 'Lucida Grande', '΢ÈíÑźÚ';color:#333;"><div><div style="color: rgb(0, 0, 0); font-family: Arial; font-size: 14px; line-height: 1.7;">Dear all:</div><div style="color: rgb(0, 0, 0); font-family: Arial; font-size: 14px; line-height: 1.7;"><br></div><div style="color: rgb(0, 0, 0); font-family: Arial; font-size: 14px; line-height: 1.7;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;I'd like to apply the following array manipulation to a multi-dimentional array, but given the volume of the array,&nbsp;</div><div style="color: rgb(0, 0, 0); font-family: Arial; font-size: 14px; line-height: 1.7;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</div><div><font face="Arial" color="#000000"><span style="line-height: 1.7;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;a loop operation </span></font><span style="color: rgb(0, 0, 0); font-family: Arial; font-size: 14px; line-height: 1.7;">cannot be accepted. How can this be done without using a loop?&nbsp;</span><font face="Arial" color="#000000"><span style="line-height: 23px;">Thanks in advance for any suggestion.</span></font></div><div style="color: rgb(0, 0, 0); font-family: Arial; font-size: 14px; line-height: 1.7;"><br></div><div style="color: rgb(0, 0, 0); font-family: Arial; font-size: 14px; line-height: 1.7;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; x &nbsp;= 1e20</div><div style="color: rgb(0, 0, 0); font-family: Arial; font-size: 14px; line-height: 1.7;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; a &nbsp;= (/1,2,3,4,5,6,x,x,x,x,x,x,x,x,x/)</div><div style="color: rgb(0, 0, 0); font-family: Arial; font-size: 14px; line-height: 1.7;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; b &nbsp;= (/x,x,x,x,x,x,x,x,x,1,2,3,4,5,6/)</div><div style="color: rgb(0, 0, 0); font-family: Arial; font-size: 14px; line-height: 1.7;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; c1 = (/x,1,x,1,x,1,x,1,x,1,x,x,x,x,x/)</div><div style="color: rgb(0, 0, 0); font-family: Arial; font-size: 14px; line-height: 1.7;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; c2 = (/x,1,x,1,x,1,1,1,1,1,1,x,x,x,x/)</div><div style="color: rgb(0, 0, 0); font-family: Arial; font-size: 14px; line-height: 1.7;"><br></div><div style="color: rgb(0, 0, 0); font-family: Arial; font-size: 14px; line-height: 1.7;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; index_up &nbsp;= max(ind(a.ne.x))</div><div style="color: rgb(0, 0, 0); font-family: Arial; font-size: 14px; line-height: 1.7;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; index_low = min(ind(b.ne.x))</div><div style="color: rgb(0, 0, 0); font-family: Arial; font-size: 14px; line-height: 1.7;"><br></div><div style="color: rgb(0, 0, 0); font-family: Arial; font-size: 14px; line-height: 1.7;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(.not.all(c1(index_up:index_low).ne.x))then</div><div style="color: rgb(0, 0, 0); font-family: Arial; font-size: 14px; line-height: 1.7;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; c1(index_up:index_low) &nbsp;= x</div><div style="color: rgb(0, 0, 0); font-family: Arial; font-size: 14px; line-height: 1.7;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end if</div><div style="color: rgb(0, 0, 0); font-family: Arial; font-size: 14px; line-height: 1.7;"><br></div><div style="color: rgb(0, 0, 0); font-family: Arial; font-size: 14px; line-height: 1.7;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(.not.all(c2(index_up:index_low).ne.x))then</div><div style="color: rgb(0, 0, 0); font-family: Arial; font-size: 14px; line-height: 1.7;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; c2(index_up:index_low) = x</div><div style="color: rgb(0, 0, 0); font-family: Arial; font-size: 14px; line-height: 1.7;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end if</div><div style="color: rgb(0, 0, 0); font-family: Arial; font-size: 14px; line-height: 1.7;"><br></div><div style="color: rgb(0, 0, 0); font-family: Arial; font-size: 14px; line-height: 1.7;"><br></div><div style="color: rgb(0, 0, 0); font-family: Arial; font-size: 14px; line-height: 1.7;">For example, in a 2D case:</div><div style="color: rgb(0, 0, 0); font-family: Arial; font-size: 14px; line-height: 1.7;"><br></div><div style="color: rgb(0, 0, 0); font-family: Arial; font-size: 14px; line-height: 1.7;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span style="line-height: 1.7;">a &nbsp; = (/(/1,2,3,4,5,6,x,x,x,x,x,x,x,x,x/),(/1,2,3,4,5,6,x,x,x,x,x,x,x,x,x/)/)</span></div><div style="color: rgb(0, 0, 0); font-family: Arial; font-size: 14px; line-height: 1.7;">&nbsp; &nbsp; &nbsp; &nbsp; <span class="Apple-tab-span" style="white-space:pre">        </span>&nbsp;&nbsp;b &nbsp; = (/(/x,x,x,x,x,x,x,x,x,1,2,3,4,5,6/),(/x,x,x,x,x,x,x,x,x,1,2,3,4,5,6/)/)</div><div style="color: rgb(0, 0, 0); font-family: Arial; font-size: 14px; line-height: 1.7;">&nbsp; &nbsp; &nbsp; &nbsp; <span class="Apple-tab-span" style="white-space:pre">        </span>&nbsp;&nbsp;c1 = (/(/x,1,x,1,x,1,x,1,x,1,x,x,x,x,x/),(/x,1,x,1,x,1,x,1,x,1,x,x,x,x,x/)/)</div><div style="color: rgb(0, 0, 0); font-family: Arial; font-size: 14px; line-height: 1.7;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; c2 = (/(/x,1,x,1,x,1,1,1,1,1,1,x,x,x,x/),(/x,1,x,1,x,1,1,1,1,1,1,x,x,x,x/)/)</div><div style="color: rgb(0, 0, 0); font-family: Arial; font-size: 14px; line-height: 1.7;"><br></div><div style="color: rgb(0, 0, 0); font-family: Arial; font-size: 14px; line-height: 1.7;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; The above operation should be copied to the other dimension, which should yield same results as in the first dimension.</div><div style="color: rgb(0, 0, 0); font-family: Arial; font-size: 14px; line-height: 1.7;"><br></div><div style="color: rgb(0, 0, 0); font-family: Arial; font-size: 14px; line-height: 1.7;">Best</div><div style="color: rgb(0, 0, 0); font-family: Arial; font-size: 14px; line-height: 1.7;"><br></div><div style="color: rgb(0, 0, 0); font-family: Arial; font-size: 14px; line-height: 1.7;"><br></div><div style="color: rgb(0, 0, 0); font-family: Arial; font-size: 14px; line-height: 1.7;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</div></div><div><font face="Arial" color="#000000"><span style="line-height: 23px;"><br></span></font></div><div><font face="Arial" color="#000000"><span style="line-height: 23px;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<br></span></font><br><br><font style="color: rgb(0, 0, 0);" face="Arial"><span style="line-height: 1.7;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></font><br><br><br><font style="color: rgb(0, 0, 0);" face="Arial"><span style="line-height: 1.7;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></font><br><font style="color: rgb(0, 0, 0);" face="Arial"><span style="line-height: 1.7;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></font><br><font style="color: rgb(0, 0, 0);" face="Arial"><span style="line-height: 1.7;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></font><br><font style="color: rgb(0, 0, 0);" face="Arial"><span style="line-height: 1.7;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></font><br></div></div></div><br><br><span title="neteasefooter"><p>&nbsp;</p></span>