/**
 * Given a list of data values and a threshold, the function filters the data and returns
 * a new list containing only the values that are greater than or equal to the threshold.
 *
 * @param data A list of data values.
 * @param threshold The threshold value.
 * @return A new list with filtered values.
 */
fun filterData(data: List<Double>, threshold: Double): List<Double> {

    val filteredList = mutableListOf<Double>()

    for (value in data) {
        if (value >= threshold) {
            filteredList.add(value)
        }
    }

    return filteredList
}
/**
 * Given a list of data values and a threshold, the function filters the data and returns
 * a new list containing only the values that are greater than or equal to the threshold.
 *
 * @param data A list of data values.
 * @param threshold The threshold value.
 * @return A new list with filtered values.
 */
fun filterData(data: List<Double>, threshold: Double): List<Double> {
/**
 * Given a list of data values and a threshold, the function filters the data and returns
 * a new list containing only the values that are greater than or equal to the threshold.
 *
 * @param data A list of data values.
 * @param threshold The threshold value.
 * @return A new list with filtered values.
 */
fun filterData(data: List<Double>, threshold: Double): List<Double> {

    val filteredList = mutableListOf<Double>()

    for (value in data) {
        if (value >= threshold) {
            filteredList.add(value)
        }
    }

    return filteredList
}