Ganglion Data Stream into MATLAB Without OpenBCI GUI
Hello
I am currently developing a Motor Imagery BCI and am wondering if it is possible to either acquire data from the Ganglion board without the OpenBCI GUI. I can use the SLS stream but want the program to run off a single software without having to go through the steps of opening the OpenBCI GUI and starting the stream. Is there anyway to acquire the data through MATLAB alone.
Thanks
Comments
Mentioning Andrey Parfenov, BrainFlow creator, @andrey1994.
We used to have matlab binding for brainflow and it was a source of issues all the time, first of all since matlab is paid its almost impossible to add it to CI\CD system. Moreover I dont have a license for it, so I downloaded it from torrents and really dont like it. And finally when C header file for BrainFlow became more compilcated I faced issues with calling C code from matlab like this one https://de.mathworks.com/matlabcentral/answers/181071-error-to-load-dll-api-using-load-libary and removed matlab binding.
I guess this issue can be fixed maybe by refactoring/splitting headers but there are others(like CI\CD, license.....).
So for now I dont have plans to restore matlab binding because in terms of efforts to support it its the most compilcated language.
Octave doesnt supoprt calling C code, so it can not be used as a replacement for matlab in our case
Thanks for the quick reply. I think I'll have to stick with the LSL stream on the GUI for now then. Thanks for all the help
If there are many requests for Matlab binding and somebody give me a license for it I can give it another try.
Another option - somebody from community can send PR to add Matlab, old code for Matlab can be found here https://github.com/Andrey1994/brainflow/tree/1e6688686b7911a2bb605a04f457087bef3c7b14/matlab-package and it was really long time ago and there were a lot of changes in the API since this commit
Its up to you, also you can check currently supported languages and maybe one of them will be good for you https://brainflow.readthedocs.io/en/stable/Examples.html
Andrey, it's possible that one of the OpenBCI academic partners may be able to get you a Matlab academic license, which is very low cost for the university involved. Joe @joeartuso may have contacts.
Hello, I posted the other week about the possibility of streaming Ganglion Data straight into MATLAB without the need for the LSL stream and noticed that MATLAB has recently been re added to brain flow. I wanted to give this a look for my current project and having MATLAB receive the data directly is much preferred. I read through the installation instructions and the documentation etc for MATLAB and downloaded brainflow from the Github and added it to my current MATLAB folder. although I am not to sure how to Compile the Core Module even after reading the instructions on how to do it and I am confused on what I need to do to receive data from the ganglion board. I'm just wondering if anyone can provide any insight on this?
Thank you
Tony, hi. I merged your new thread into this existing one. Have you looked at the docs?
https://brainflow.readthedocs.io/en/master/Examples.html#matlab
Another recent thread where Andrey commented is here,
https://openbci.com/forum/index.php?p=/discussion/2506/how-to-connect-openbci-with-matlab-lsl-or-brainflow/
Mentioning Andrey @Andrey1994 .
Regards, William
Hello
Thanks for the speedy reply. I did have a look at the docs and that thread was where I discovered that the MATLAB functionality had been added. I did try running the code to get data from the board but got an error message on the 1st line. I've pasted it below:
whats inside matlab-package/brainflow/inc folder? Is there shared_export.h? How did you compile core module and did you add inc folder to matlab path?
I don't have an Inc folder in the matlab-package/brainflow folder. I'll be honest I didn't really expect it to work because I have no idea how to compile the core module. I read the docs but they don't make to much sense to me. Sorry I've only ever coded in MATLAB so alot of this stuff is quite new to me. Also I added the entire brainflow folder into MATLAB and added all folders and subfolders to path.
Thanks for your help btw.
You dont need to add entire brainflow folder to matlab and without compilation it will not work. Just follow these instructions https://brainflow.readthedocs.io/en/stable/BuildBrainFlow.html#matlab