-
Notifications
You must be signed in to change notification settings - Fork 16
5. Use with Fieldtrip
Arnaud Delorme edited this page Mar 9, 2020
·
1 revision
MFFMatlabIO is now the default import program for MFF files in Fieldtrip.
First download the latest version of Fieldtrip
Then, download the MFF test file and unzip it. Start a Matlab session.
Make sure that the Fieldtrip main folder is in your path and that the folder NIA_333ms_HCGSN32_test01.mff (which you have downloaded above) is in your current Matlab path. On the Matlab command line type
hdr = ft_read_header(fullfile(pwd, 'NIA_333ms_HCGSN32_test01.mff'));
events = ft_read_event(fullfile(pwd, 'NIA_333ms_HCGSN32_test01.mff'), 'header', hdr);
data = ft_read_data(fullfile(pwd, 'NIA_333ms_HCGSN32_test01.mff'), 'header', hdr);
Plot and check the data
figure; plot(data(:,1:1000)' + repmat([1:size(data,1)]*100, [1000 1]));
Writing the data back to MFF format
ft_write_data(fullfile(pwd, 'test.mff'), data, 'header', hdr, 'event', events, 'dataformat', 'mff');
Import back into Netstation