private double[] concatenateSamples(final double[] x,final double[] y){
  final double[] z=new double[x.length + y.length];
  System.arraycopy(x,0,z,0,x.length);
  System.arraycopy(y,0,z,x.length,y.length);
  return z;
}

private double [ ] concatenateSamples ( final double [ ] x , final double [ ] y ) { final double [ ] z = new double [ x . length + y . length ] ; System . arraycopy ( x , 0 , z , 0 , x . length ) ; System . arraycopy ( y , 0 , z , x . length , y . length ) ; return z ; }
concatenate the samples into one array .
