Here you can find the source of arraySubtract(double[] x1, double[] x2)
public static double[] arraySubtract(double[] x1, double[] x2)
//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; } }