<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2912" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face="Trebuchet MS" size=2>Only 4--so I could definitely do
that. It just seems like there should be a more efficient way--something
akin to excel's MIN() and MAX () functions.</FONT></DIV>
<BLOCKQUOTE dir=ltr
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=Fredrik.Ullen@ki.se href="mailto:Fredrik.Ullen@ki.se">Fredrik
Ullén</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=eprime@mail.talkbank.org
href="mailto:eprime@mail.talkbank.org">eprime@mail.talkbank.org</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Wednesday, June 28, 2006 11:18
AM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> Re: find minimum</DIV>
<DIV><BR></DIV>Hi Colleen,<BR>Why not just write a brief Inline script to loop
through the array and find the smallest value?<BR>How many values do you
have?<BR>Best<BR>Fredrik<BR>At 20:01 2006-06-28, Colleen Parks wrote:<BR>
<BLOCKQUOTE class=cite cite="" type="cite"><FONT face="Trebuchet MS"
size=2>Hi,<BR></FONT> <BR><FONT face="Trebuchet MS" size=2>I've got an
array to which I've assigned a list of random numbers (e.g., Array(0) =
random(0,100)). I need to find which element/array position has the
lowest value without sorting the array (position in the array is important
for another variable later on). I've spent a good amount of time
searching to figure out what the code is to find the minimum value of a list
of variables, but haven't found anything yet. There is no obvious
documentation of a general "find min" and "find max" function outside of the
summation object. (Note that a summation object won't help because it will
return the minimum of a set of values, but will not, as far as I can tell,
indicate which variable (or observation) the minimum value is linked
to). There's got to be a find min/max ability in there
somewhere! Can anyone point me in the right
direction?<BR></FONT> <BR><FONT face="Trebuchet MS"
size=2>Thanks!<BR>Colleen<BR></FONT> <BR> <BR><FONT
face="Trebuchet MS"
size=2>---------------------------------------<BR>Colleen Parks,
Ph.D.<BR>Psychology Department<BR>University of California<BR>One Shields
Ave.<BR>Davis, CA 95616<BR></FONT> <BR><FONT face="Trebuchet MS"
size=2><A
href="mailto:cmparks@ucdavis.edu">cmparks@ucdavis.edu</A><BR>530.754.9439</BLOCKQUOTE><X-SIGSEP>
<P></X-SIGSEP>Fredrik Ullén<BR>Associate Professor<BR>Stockholm Brain
Institute<BR>Dept Woman and Child Health<BR>Neuropediatric Research Unit (ALB,
Q2:07)<BR>Karolinska Institutet<BR>SE-171 76 Stockholm<BR>Sweden<BR>personal
web page <A href="http://www.fredrikullen.com/"
eudora="autourl">www.fredrikullen.com<BR></A></FONT></P></BLOCKQUOTE></BODY></HTML>