Loading...
Logo
Processing Forum

.txt file arraylist and fourier

in General Discussion  •  Other  •  1 year ago  
dear all,

i am very new in processing and i need to hard code a part of a project.

basically i am working with an EEG and i have been able to obtain raw data from it. 512 times a second. the values are being printer in a file i called "positions.txt."

now i need to get into this file (i have been said with an arraylist) and then apply a discrete fourier 

how can i do it?

thank you very much for your time


Replies(2)

To get the contents from a file into Processing, see the examples that come with Processing or search the forum. This is pretty basic and has been covered countless times. You can use loadStrings() and other available methods.

If you want FFT, you could use Minim.

If you want DFT, you could use some other java library, for example JTransforms.

First step: loadStrings(), if you don't already have it...
Then, to create an ArrayList from it, try something like this:

Copy code
  1. ArrayList  list = new ArrayList(Arrays.asList(inputArray));

Beyond that, I don't think I can help you too much...