PSPicker, a matlab tool for automatic phase picking and event location
Function make to get weight from an array based on hypo71 format
Input: given_val > value to be converted to weight
array_val > array containing 4 values to perfrom conversion
Output: weight > weight in hypo71 format
Example: w=get_weight(4,[0 5 10 20]), then because 4 is between 0 and 5, the weigth is 3