Import OpenBCI data into Matlab
Hi Guys,
When I was trying to import the data into Matlab using csvread() function. The data is not imported correctly. The problem is:
- One row with all zeros is inserted every single row
- The second half of the data is lost although the total amount of rows are the same.
Could you help me explain it and how I can debug? I attached the screenshot and my data. 
@wjcroft, @retiutut, @evaesteban
Thank you so much!
Comments
Some of the online tutorials, instructions for importing the OpenBCI_GUI csv recording into Matlab -- are still geared around the OLD csv format. You must adapt the instructions for the new format. Format (of both old and new csv's), is shown in comments at the top of the file.
William
https://docs.openbci.com/docs/06Software/02-CompatibleThirdPartySoftware/Matlab
Thank you for your clarification! Does that imply you can't automate the import process using Matlab script?
If you have a script for the old format, it will need changes to adapt to the new format. Should be easy.
Could you tell me how to adapt? I used the script from this tutorial https://openbci.com/community/eeglab-tutorial-import-data/ and rows with zeros were generated. How should I change it? Thank you!
You are a Matlab programmer, correct? Look at the header line in the csv file, it gives the format. Change the program to adapt to the new format. For reference, you can also find online examples of the old csv format and header line.
I am not sure if we are on the same page. The question was why "One row with all zeros was inserted every single row" when I imported the data. Each row of the data was fine except that one "0 row" was automatically generated. If you deleted those rows, you got exactly the first half of the data. Thank you for your patience.
There are many more columns in the new format. Please follow the previous suggestions. When you get your new script working, post a copy here and on the community link.