Java Array Subtract arraySubtract(double[] x1, double[] x2)

Here you can find the source of arraySubtract(double[] x1, double[] x2)

Description

array Subtract

License

Open Source License

Declaration

public static double[] arraySubtract(double[] x1, double[] x2) 

Method Source Code

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

public class Main {
    public static double[] arraySubtract(double[] x1, double[] x2) {

        double[] result = new double[x1.length];
        for (int i = 0; i < x1.length; i++) {
            result[i] = x1[i] - x2[i];/*from  w ww  . j av a 2  s  . com*/
        }
        return result;
    }
}

Related

  1. arraySubtract(final Double[] first, final Double[] second)
  2. subtract(byte[] a, byte[] b)
  3. subtract(double[] a, double[] b)
  4. subtract(double[] a, double[] b)