MatlabFilter in bci2000chain

Locked
rubmoe
Posts: 9
Joined: 27 Sep 2013, 05:54

MatlabFilter in bci2000chain

Post by rubmoe » 21 Oct 2013, 06:41

Hi everyone,

I would like to analyze recorded EEG data with the bci2000chain function in matlab. The bci2000chain usually works fine, but if I try to inculde the MatlabFilter I get the following error:

Logic Error: MatlabFilter::Constructor: Unhandled Win32 exception 0xc0000005: ACCESS_VIOLATION
Aborting MatlabFilter


I got the same error before, when I was trying to use the MatlabDemo_SignalGenerator batch. I could fix this error by downloading the modified MatlabSignalProcessing module here: http://www.bci2000.org/phpbb/viewtopic. ... 9&start=15

However, when trying to use the MatlabFilter in the bci2000chain I still get the error. Can you tell me how to fix this?

I have Windows 7 64-bit and Matlab R2012a 64-bit.

Thanks and regads

boulay
Posts: 382
Joined: 25 Dec 2011, 21:14

Re: MatlabFilter in bci2000chain

Post by boulay » 21 Oct 2013, 11:48

BCI2000 chain doesn't use the full signal processing module (BCI2000\prog\MatlabSignalProcessing.exe). Instead it uses just a command-line version of the filter (BCI2000\tools\cmdline\MatlabFilter.exe).

See attached. I built it just now but I haven't tested it. Let me know if you have any trouble.

Your plan will have a Matlab function invoke a command-line program that invokes a Matlab engine. It could work, or it could go horribly wrong. Don't forget your totem http://inception.wikia.com/wiki/Totem.
Attachments
MatlabFilter.zip
MatlabFilter commandline tool compiled for Win7 x64.
(259.05 KiB) Downloaded 331 times

rubmoe
Posts: 9
Joined: 27 Sep 2013, 05:54

Re: MatlabFilter in bci2000chain

Post by rubmoe » 22 Oct 2013, 04:54

thanks for your reply, but unfortunately i still get the same error.

mellinger
Posts: 1210
Joined: 12 Feb 2003, 11:06

Re: MatlabFilter in bci2000chain

Post by mellinger » 22 Oct 2013, 09:56

Hi,

in older versions of the MatlabFilter (especially the 3.0.5 version downloadable from the web site), the access violation occurs due to a bug in code that is supposed to display an error message (awkward, I know).
The displayed message would state that one of the Matlab DLLs could not be loaded.

In most cases, the reason will be that either
* Matlab's bin directory is not in the system path (which is unrelated to Matlab's own path variable),
* or you are running a 32-bit BCI2000 executable on a 64-bit system with a 64-bit Matlab installed.

In the latter case, you might compile yourself a 64-bit version of BCI2000, or install a 32-bit version of Matlab on your machine.

Best regards,
Juergen

Locked

Who is online

Users browsing this forum: No registered users and 22 guests