I am learning android and am trying to make an application which involves the Fourier Transform. I found some example code but it was for doubles and I want to use floats and an arraylist instead. I changed most of the code but do not know how to change the line of code with arraycopy. The code is as follows:
public static void fourierTrans(ArrayList<Float> array) {
FloatFFT_1D fftDo = new FloatFFT_1D(array.size());
float[] fft = new float[array.size() * 2];
System.arraycopy(array, 0, fft, 0, array.size()); //This line here
fftDo.realForwardFull(fft);
/*for(float d: fft) {
System.out.println(d);
}*/
}
Does anyone know an arraycopy equivalent for arraylists with floats?
0 comments:
Post a Comment