// file: csnr_cal_9.cc // // this function finds the minimum number in an array of numbers // // system include file // // local include file // #include "global_constants.h" #include "calculate_snr_constants.h" #include "calculate_snr.h" // function: calculate_min_cc // // arguments: // float* energy_buffer_a: (input) array of numbers // int num_energy_vals_a: (input) how many numbers in the array // // return: the end time of the file // // this function finds the minimum number in an array of numbers // // float calculate_min_cc (float* energy_buffer_a, int num_energy_vals_a) { float min = CSNR_MIN_VAL; for (int i = 0; i < num_energy_vals_a; i++) { if (energy_buffer_a[i] < min) { min = energy_buffer_a[i]; } } // return the minimum value // return (min); }