Mat to gdf,edt,bci2000dat
-
eelamin
- Posts: 9
- Joined: 19 Jun 2010, 09:00
Mat to gdf,edt,bci2000dat
Hello
I am experiencing problem in converting eeg signal in the format .mat
into any format that supported by the bci2000 offline analysis toolbox
I will be pleased if someone help me
Elgasim
I am experiencing problem in converting eeg signal in the format .mat
into any format that supported by the bci2000 offline analysis toolbox
I will be pleased if someone help me
Elgasim
-
mellinger
- Posts: 1341
- Joined: 12 Feb 2003, 11:06
-
mellinger
- Posts: 1341
- Joined: 12 Feb 2003, 11:06
You will need to specify target conditions for each point in time. Create a struct variable "states" with a member "StimulusCode" in Matlab, which is a N x 1 matrix. It should have as many entries as there are samples in the data set. For each point in time, assign a StimulusCode of 0, 1, 2, or 3, depending on which imagination was performed at that point in time:
Assuming that the EEG signal is contained in a variable called "signal" with dimensions channels x samples, run the following command:
save_bcidat('myfile.dat', signal, states, parameters);
The resulting file should be suited for use with the BCI2000 OfflineAnalysis program.
- 0 when no imagination was performed,
1 when right hand movement was imagined,
2 during left hand imagination,
3 during leg movement imagination.
Code: Select all
>> parameters.SamplingRate
ans =
Section: 'Source'
Type: 'int'
DefaultValue: '256Hz'
LowRange: '1'
HighRange: ''
Comment: 'sample rate'
Value: {'600'}
NumericValue: 600
save_bcidat('myfile.dat', signal, states, parameters);
The resulting file should be suited for use with the BCI2000 OfflineAnalysis program.
-
eelamin
- Posts: 9
- Joined: 19 Jun 2010, 09:00
I had constructed the structures states,parameters with their substructures stimuluscode, samplingrate respectively but,when using the command:
save_bcidat('myfile.dat', signal, states, parameters);
returns:
??? Error using ==> save_bcidat
Parameter values must be strings or cell arrays of strings.
and when i convert the parameters.sampling rate into cell using the command:
struct2cell
it returns:
??? Error using ==> save_bcidat
Could not access string field "Section".
would yu help me please
save_bcidat('myfile.dat', signal, states, parameters);
returns:
??? Error using ==> save_bcidat
Parameter values must be strings or cell arrays of strings.
and when i convert the parameters.sampling rate into cell using the command:
struct2cell
it returns:
??? Error using ==> save_bcidat
Could not access string field "Section".
would yu help me please
-
mellinger
- Posts: 1341
- Joined: 12 Feb 2003, 11:06
Did you enclose the parameter value into curly braces as in
?
Code: Select all
parameters.SamplingRate.Value = {'600‘}-
mellinger
- Posts: 1341
- Joined: 12 Feb 2003, 11:06
When you write
what does the output look like?
Code: Select all
parameters.SamplingRate-
eelamin
- Posts: 9
- Joined: 19 Jun 2010, 09:00
the code looks like:
>> parameters.SamplingRate
ans =
Section: 'Source'
Type: 'int16'
DefaultValue: '256Hz'
LowRange: '1'
HighRange: ''
Comment: 'sample rate'
Value: '{100}'
NumericValue: '100'
and when using the command struct2cell it looks like;
>> parameters.SamplingRate
ans =
'Source'
'int16'
'256Hz'
'1'
''
'sample rate'
'{100}'
'100'
>> parameters.SamplingRate
ans =
Section: 'Source'
Type: 'int16'
DefaultValue: '256Hz'
LowRange: '1'
HighRange: ''
Comment: 'sample rate'
Value: '{100}'
NumericValue: '100'
and when using the command struct2cell it looks like;
>> parameters.SamplingRate
ans =
'Source'
'int16'
'256Hz'
'1'
''
'sample rate'
'{100}'
'100'
Who is online
Users browsing this forum: No registered users and 0 guests
