<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><div style="min-height:22px;margin-bottom:8px;">Thank you. Dear Mathis. It works now.</div><div style="min-height:22px;margin-bottom:8px;"><br></div><div style="min-height:22px;margin-bottom:8px;">Regard,</div><font color="#444444">Tony</font><br><div id="original-content"><br><br><div><div style="font-size:70%;padding:2px 0;">------------------ Original ------------------</div><div style="font-size:70%;background:#f0f0f0;color:#212121;padding:8px;border-radius:4px"><div><b>From:</b> Mathis Kaiser  <mathis.kaiser@charite.de></div><div><b>Date:</b> Tue,Jul 2,2019 11:58 PM</div><div><b>To:</b> fieldtrip <fieldtrip@science.ru.nl></div><div><b>Subject:</b> Re: [FieldTrip] Subject: Dysfunction with ft_definetrial</div></div></div><br><pre style="white-space:pre-wrap;">Hi Tony,

have you tried specifying the .vhdr file instead of the .dat file as
cfg.dataset? It looks like Fieldtrip is expecting a Curry dataset
without this.

HTH,
Mathis

On 02.07.19 14:38, Tony TREE wrote:
> Dear Fieldtrip Community,

> I'm focusing on the research of brain computer interface on stroke
> rehabilitation. Currently I tried ft_definetrial but I received the
> following error message:
> /_Error using fopen_or_error (line 24)_/
> /_could not open file ._/
> /_Error in load_curry_data_file (line 54)_/
> /_fid = fopen_or_error(ParameterFile,'rt');_/
> /_Error in ft_read_header (line 744)_/
> /_    orig            = load_curry_data_file(filename);_/
> /_Error in ft_trialfun_general (line 84)_/
> /_  hdr = ft_read_header(cfg.headerfile, 'headerformat',
> cfg.headerformat);_/
> /_Error in ft_definetrial (line 185)_/
> /_    [trl, event] = feval(cfg.trialfun, cfg);_/

> The cfg (run ft definetrial) and data (LM_1) I used are in the link:
> https://www.dropbox.com/sh/zggeusihhbeoeg0/AACWpO6MgiLr_lOTZRCzBm2ba?dl=0.

> The versions I used are: Matlab R2013b, eeglab14_1_2b
> and fieldtrip-20190618. I have also tried Matlab
> 2019, eeglab13_5_4b, fieldtrip-20190606, fieldtrip-20131231 as well
> as fieldtrip-20121231. But they didn't work and came out with the same
> error.

> Besides, I also run:
> _/restoredefaultpath/_
> _/addpath E:\fieldtrip-20190618/_
> _/ft_defaults/_
> but it still didn't work.

> Now I have no idea of what is the problem. Waiting for your kind reply.
> Thank you all.

> Regard,
> Tony Chen

> _______________________________________________
> fieldtrip mailing list
> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> https://doi.org/10.1371/journal.pcbi.1002202

_______________________________________________
fieldtrip mailing list
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
https://doi.org/10.1371/journal.pcbi.1002202
</pre></div>