Plx data processing in linux server

Dear Francois,

I’m sorry to disturb you. Recently, I was learning how to use brainstorm to process the EEG signals collected by Plexon in the matlab installed in Linux server. Unfortunately, I get the following error when I click to Review raw file: Undefined function 'mexPlex' for input arguments of type 'double'.
The specific error report is

BST> Plugin plexon already loaded: /home/.brainstorm/plugins/plexon


** Error: Line 71: Undefined function 'mexPlex' for input arguments of type 'double'.
**
** Call stack:
** >plx_info.m at 71
** >in_fopen_plexon.m at 62
** >in_data_plx.m at 32
** >in_fopen.m at 166
** >import_raw.m at 127
** >bst_call.m at 28
** >tree_callbacks.m>@(h,ev)bst_call(@import_raw,[],[],iSubject) at 660


Looking forward to your reply. Thanks for all your help.

Best,

Han xiaoke

Indeed, the Plexon Matlab SDK is not available natively for Linux 64bit systems.

You need to recompile it manually on your computer after installing the plugin.
The documentation indicates that running the script build_and_verify_mexPlex.m builds the MEX file on Linux (mexPlex.mexa64).

You can find this the build_and_verify_mexPlex.m file in:
/home/USERNAME/.brainstorm/plugins/plexon/Matlab Offline Files SDK/mexPlex

Note that you need a version of GCC that is supported by tyour Matlab release:
https://www.mathworks.com/support/requirements/supported-compilers.html

We have successfully tested this approach with Ubuntu 18.04, GCC 7.5 and Matlab 2020b

If this doesn't solve your issue, contact the Plexon customer support:
https://plexon.com/wp-content/uploads/2017/08/OmniPlex-and-MAP-Offline-SDK-Bundle_0.zip

Please let us know if you find a solution to this problem.

Edit: Added tested setup

1 Like

Dear Francois,
I'm sorry it took so long to reply to you.
I tried to ran the script build_and_verify_mexPlex.m and now I can successfully import the data.
I have successfully tested this approach with Ubuntu 16.04 and Matlab 2019b.
Thanks again for your reply and help.
Yours,
Han Xiaoke