[FieldTrip] ft_preprocessing for mat file

Sina Makhdoomi Kaviri sinam1 at umbc.edu
Wed May 8 23:53:21 CEST 2024


To whom it may concern,

I want to preprocess .mat file which can be found in (
http://bnci-horizon-2020.eu/database/data-sets (Accession Number
001-2020)). I can access to the files by regular load function in Matlab,
but it has an error as follows in ft_preprocessing:

>> %% Data preprocessing
dataset = 'D:/fieldtrip/dataset/RGdataset/G01.mat';
dataset1 = load(dataset);
data = dataset1.signal;
header  = dataset1.header
channel = header.channels_labels;
cfg = [];
cfg.dataset              = dataset;
cfg.continuous           = 'yes';
cfg.datafile             = data;
cfg.headerfile           = header;
cfg.channel              = channel;
data_segmented           = ft_preprocessing(cfg);

header =
  struct with fields:
               runs: []
        device_type: 'gtec'
       channels_eeg: [1×58 double]
       channels_eog: [59 60 61 62 63 64]
    channels_labels: {1×64 cell}
        sample_rate: 256
        event_codes: [503587 501794 534562 503588 501795 534563 768 769 10
11 12 13 14 15]
        event_names: {1×14 cell}

Dot indexing is not supported for variables of this type.

Error in ft_read_header (line 2795)
if numel(hdr.label) < hdr.nChans

Error in ft_preprocessing (line 391)
  hdr = ft_read_header(cfg.headerfile, headeropt{:});

Please let me know how I can preprocess this dataset to source localization
or reconstruction methods.

Best regards,
Sina
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20240508/76df14af/attachment.htm>


More information about the fieldtrip mailing list