<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
</head>
<body>
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p>Dear Moumita,<br>
<br>
Maybe try saying:<br>
<br>
</p>
<div>cd ('<span>F:\data_fldtrp</span>');<br>
<span>data = '1_MD_1_edtd.set';</span><br>
</div>
I use the adding to path for making sure my toolboxes' folders are added, so maybe the 'change directory' command is better in your case? I usually add my file, assigning it to a variable, then I add my cfg "options" separately as subfields of this configuration
structure, like so "cfg.time, cfg.trials, etc.". And when I want to do something to the file, I just do, for example:<br>
<br>
ft_redefinetrial (data, cfg)<br>
<br>
<br>
Best,<br>
<br>
Zlati<br>
<p></p>
<p><br>
</p>
<div id="Signature">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, "EmojiFont", "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div><span style="font-family:"Lucida Sans Unicode","Lucida Grande",sans-serif; font-size:9pt">PhD Researcher</span></div>
<span style="font-family:"Lucida Sans Unicode","Lucida Grande",sans-serif; font-size:9pt"></span>
<div><span style="font-family:"Lucida Sans Unicode","Lucida Grande",sans-serif; font-size:9pt">School of Psychology</span></div>
<span style="font-family:"Lucida Sans Unicode","Lucida Grande",sans-serif; font-size:9pt"></span>
<div><span style="font-family:"Lucida Sans Unicode","Lucida Grande",sans-serif; font-size:9pt">University of Birmingham</span></div>
<div><br>
</div>
<div><span><i><span style="color:rgb(114,50,173); font-family:"Lucida Sans Unicode","Lucida Grande",sans-serif; font-size:9pt">Please note that I am currently working more flexibly, which</span><span style="color:rgb(114,50,173); font-family:"Lucida Sans Unicode","Lucida Grande",sans-serif; font-size:9pt">
may result in sending and </span><span style="color:rgb(114,50,173)"><span style="font-family:"Lucida Sans Unicode","Lucida Grande",sans-serif; font-size:9pt">responding to emails out of hours,</span><span style="font-family:"Lucida Sans Unicode","Lucida Grande",sans-serif; font-size:9pt">
but </span></span><span style="color:rgb(114,50,173); font-family:"Lucida Sans Unicode","Lucida Grande",sans-serif; font-size:9pt">there is no expectation on you to do the same.</span></i></span><br>
</div>
</div>
</div>
</div>
</div>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> fieldtrip <fieldtrip-bounces@science.ru.nl> on behalf of fieldtrip@science.ru.nl <fieldtrip@science.ru.nl><br>
<b>Sent:</b> Monday, June 20, 2022 11:54:12 AM<br>
<b>To:</b> Eva Masson<br>
<b>Cc:</b> Moumita bhowmick; FieldTrip discussion list<br>
<b>Subject:</b> Re: [FieldTrip] problem in importing my data in fieldtrip</font>
<div> </div>
</div>
<div>
<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>
</div>
</body>
</html>