find minimum

Colleen Parks cmparks at ucdavis.edu
Wed Jun 28 18:37:14 UTC 2006


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.
  ----- Original Message ----- 
  From: Fredrik Ullén 
  To: eprime at mail.talkbank.org 
  Sent: Wednesday, June 28, 2006 11:18 AM
  Subject: Re: find minimum


  Hi Colleen,
  Why not just write a brief Inline script to loop through the array and find the smallest value?
  How many values do you have?
  Best
  Fredrik
  At 20:01 2006-06-28, Colleen Parks wrote:

    Hi,
     
    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?
     
    Thanks!
    Colleen
     
     
    ---------------------------------------
    Colleen Parks, Ph.D.
    Psychology Department
    University of California
    One Shields Ave.
    Davis, CA 95616
     
    cmparks at ucdavis.edu
    530.754.9439
  Fredrik Ullén
  Associate Professor
  Stockholm Brain Institute
  Dept Woman and Child Health
  Neuropediatric Research Unit (ALB, Q2:07)
  Karolinska Institutet
  SE-171 76 Stockholm
  Sweden
  personal web page www.fredrikullen.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.linguistlist.org/pipermail/eprime/attachments/20060628/be9984dc/attachment.htm>


More information about the Eprime mailing list