[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: Median



     I believe that the problem of finding the median is equivalent to the 
     problem of sorting.  After you sort, the median is in the middle.
     
     SQR does not provide sorting.  To sort in SQR there are basically two 
     ways:
     
     1. Write the data to an external file using a WRITE command.
        Sort the data using the O/S SORT command. This is invoked from
        SQR with the CALL SYSTEM command.
        Read the data back in from the external file using the SQR READ 
        command.
     
     2. Store the data into an SQR array.  Write a simple array sorting 
        procedure such as bubble sort to sort the array.
     
     Gadi Yedwab
     MITI


______________________________ Reply Separator _________________________________
Subject: Median
Author:  usa.net!sqr-users@netcomsv.netcom.com at Internet
Date:    3/4/95 6:40 AM


I am trying to get the median of a list of numbers.  Does anybody have an SQR 
routine to do this?