Java Array Absolute Value absMean(double[] arr)

Here you can find the source of absMean(double[] arr)

Description

absMean

License

Open Source License

Parameter

Parameter Description
signal a parameter

Declaration

public static double absMean(double[] arr) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    /**/*from  www.  ja  va2 s .co m*/
     * absMean
     *
     * @param signal
     * @return
     */
    public static double absMean(double[] arr) {
        double result = 0;
        double len = arr.length;

        for (int i = 0; i < arr.length; i++) {
            double val = Math.abs(arr[i]);

            result += val / len;
        }

        return result;
    }
}

Related

  1. absDiff(Double[] a, Double[] b)
  2. absMax(double x, double y)
  3. absMax(double[] arr)
  4. absMax(double[] data)
  5. absMax(double[] vector)
  6. absMean(double[] x)
  7. absolulteValue(float[][] image)