<div dir="ltr">Hello Eva,<div>Thanks for your reply. I mistakenly typed differently for the email. Let me write it again. </div><div><br></div><div><div><p class="MsoNormal">I am trying to import continuous data into the fieldtrip for ft_preprocessing. Since I need to do ft_definetrial first for which I need to know the eventtype and eventvalues first, I tried calling ft_definetrial with cfg.dataset. <u></u><u></u></p><p class="MsoNormal"><br></p></div><div><p class="MsoNormal">1) I gave the following command:<u></u><u></u></p></div><div><p class="MsoNormal">cfg = [];<u></u><u></u></p></div><div><p class="MsoNormal">cfg.dataset = '1_MD_1_edtd.set';<br>cfg.trialdef.eventtype = '?';<br>ft_definetrial(cfg);<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">But I am getting the following error: <u></u><u></u></p></div><div><p class="MsoNormal">Error using ft_trialfun_show (line 56)<u></u><u></u></p></div><div><p class="MsoNormal">file or directory '1_MD_1_edtd.set' does not exist<br><br>Error in ft_definetrial (line 199)<br> [trl, event] = feval(cfg.trialfun, cfg);<br clear="all"><u></u><u></u></p><p class="MsoNormal"><br></p><div><p class="MsoNormal">2) I then tried specifying the filepath with the following command:</p></div><div><p class="MsoNormal">cfg = [];<br>cfg.dataset = 'F:\data_fldtrp\1_MD_1_edtd.set';<br>cfg.trialdef.eventtype = '?';<br>ft_definetrial(cfg);<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> But I am still getting the same error. </p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">3) <u></u>I then tried the following (without specifying the extension .set):</p><div><p class="MsoNormal">cfg = [];<u></u><u></u></p></div><div><p class="MsoNormal">cfg.dataset = '1_MD_1_edtd';<br>cfg.trialdef.eventtype = '?';<br>ft_definetrial(cfg);</p><p class="MsoNormal"><br></p></div><p class="MsoNormal">In return I am getting the following:</p><p class="MsoNormal">Warning: file or directory "1_MD_1_edtd" does not exist, could not determine file format <br>Warning: unsupported event format "unknown" <br>no events were found in the data<br>no trials have been defined yet, see FT_DEFINETRIAL for further help<br>found 0 events<br>the call to "ft_definetrial" took 0 seconds<br></p><p class="MsoNormal"><br></p><p class="MsoNormal">4) I tried following your suggestion. Did you mean the following?</p><p class="MsoNormal">cfg = [];<br>addpath('F:\data_fldtrp');<br>cfg.dataset = '1_MD_1_edtd.set';<br>cfg.trialdef.eventtype = '?';<br>ft_definetrial(cfg);<br></p><p class="MsoNormal">For which I got the following error:</p><p class="MsoNormal">Error using ft_trialfun_show (line 56)<br>file or directory '1_MD_1_edtd.set' does not exist<br><br>Error in ft_definetrial (line 199)<br>    [trl, event] = feval(cfg.trialfun, cfg);<br></p><p class="MsoNormal"><br></p><p class="MsoNormal">5) I then tried the following: </p><p class="MsoNormal">addpath('F:\data_fldtrp');<br>cfg = [];<br>cfg.dataset = '1_MD_1_edtd.set';<br>cfg.trialdef.eventtype = '?';<br>ft_definetrial(cfg);<br></p><p class="MsoNormal">I am getting the same error.</p><p class="MsoNormal"><br></p><p class="MsoNormal">How to write cfg.dataset = 'F:\data_fldtrp\1_MD_1_epochs.set'; so that fieldtrip can find the file? Why does it keep on saying 'the file does not exist'?<br></p></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jun 20, 2022 at 4:05 PM Eva Masson <<a href="mailto:eva.masson@hotmail.fr">eva.masson@hotmail.fr</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">





<div lang="FR" style="overflow-wrap: break-word;">
<div class="gmail-m_-2760842580618284763WordSection1">
<p class="MsoNormal">Hi Moumita,</p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Maybe try to add the path before, adding a line like :</p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">addpath(‘F:\data_fldtrp’)</p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Then you should be able to call your dataset with the first set of commands your wrote.</p>
<p class="MsoNormal">I hope this helps.</p>
<p class="MsoNormal">Alternatively, the second option you mentionned should also work, but the file you are calling is not the same in the two examples.</p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Best,</p>
<p class="MsoNormal">Éva<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<div style="border-right:none;border-bottom:none;border-left:none;border-top:1pt solid rgb(225,225,225);padding:3pt 0cm 0cm">
<p class="MsoNormal" style="border:none;padding:0cm"><b>De : </b><a href="mailto:fieldtrip@science.ru.nl" target="_blank">Moumita bhowmick via fieldtrip</a><br>
<b>Envoyé le :</b>lundi 20 juin 2022 12:20<br>
<b>À : </b><a href="mailto:fieldtrip@science.ru.nl" target="_blank">fieldtrip@science.ru.nl</a><br>
<b>Cc : </b><a href="mailto:bhowmickmoumita1@gmail.com" target="_blank">Moumita bhowmick</a><br>
<b>Objet :</b>[FieldTrip] problem in importing my data in fieldtrip</p>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">Hello,<u></u><u></u></p>
<div>
<p class="MsoNormal">I am a novice in fieldtrip. Trying to learn it for my EEG analysis, on my own. I don't have any local group with whom I can discuss the problems I am facing here. I am trying to import continuous data into the fieldtrip for ft_preprocessing.
 Since I need to do ft_definetrial first for which I need to know the eventtype and eventvalues first, I tried calling ft_definetrial with cfg.dataset. <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">I gave the following command:<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">cfg = [];<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">cfg.dataset = '1_MD_1_edtd.set';<br>
cfg.trialdef.eventtype = '?';<br>
ft_definetrial(cfg);<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">But I am getting the following error: <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Error using ft_trialfun_show (line 56)<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">file or directory '1_MD_1_edtd.set' does not exist<br>
<br>
Error in ft_definetrial (line 199)<br>
 [trl, event] = feval(cfg.trialfun, cfg);<br clear="all">
<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">I then tried specifying the filepath with the following command:<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">cfg = [];<br>
cfg.dataset = 'F:\data_fldtrp\1_MD_1_epochs.set';<br>
cfg.trialdef.eventtype = '?';<br>
ft_definetrial(cfg);<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">But I am still getting the same error. How to write cfg.dataset = 'F:\data_fldtrp\1_MD_1_epochs.set'; so that fieldtrip can find the file? <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Will be highly obliged if you can help me understand how to import data into fieldtrip.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Thanking you,<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Moumita<u></u><u></u></p>
</div>
<p class="MsoNormal">-- <u></u><u></u></p>
<div>
<div>
<div>
<div>
<p class="MsoNormal">Moumita Bhowmick<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">PhD student <u></u><u></u></p>
<div>
<p class="MsoNormal">School of Cognitive Science,<u></u><u></u></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<p class="MsoNormal">Jadavpur University<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>

</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div>Moumita Bhowmick</div><div dir="ltr">PhD student <div>School of Cognitive Science,</div><div>Jadavpur University</div></div></div></div></div>