Converts the input array to dB (10*log10()) - Java Collection Framework

Java examples for Collection Framework:Array Algorithm

Description

Converts the input array to dB (10*log10())

Demo Code


//package com.java2s;

public class Main {
    /**/*from ww w  .  j a va  2  s  .  c  om*/
     * Converts the input array to dB (10*log10())
     * @param input
     */
    public static void toDb(double[] input) {
        for (int i = 0; i < input.length; i++) {
            input[i] = 10 * Math.log10(input[i]);
        }
    }
}

Related Tutorials