<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'><div> I need to get the index of the maximum value at each location. </div><div> </div><div>It turns out the following loop is very slow! (i,j loop between 0-1000)</div><div><br></div><div> do j = 0, dimlc(0)-1</div><div> print("working on row "+j)</div><div> do i = 0, dimlc(1)-1</div><div> Time_mpr(j,i) = maxind(mpr(:,j,i))</div><div> end do ;</div><div> end do ;</div><div><br></div><div><br></div><div>Better approach to do this quicker? </div><div><br></div><div>Thanks</div><div>Xiaoming </div>                                            </div></body>
</html>