public static float[] subtractMean(float[] x) {
		float mean = 0;
		for (int i = 0; i < x.length; i++) {
			mean += x[i];
		}
		mean /= x.length;
		
		float[] y = new float[x.length];
		for (int i = 0; i < x.length; i++) {
			y[i] = x[i] - mean;
		}
		
		return y;
	}