<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi Bahareh,<div class=""><br class=""></div><div class="">I had the same issue before too. I also created the needed structure and then used ft_redefinetrial. Not optimal, but it did the job!!</div><div class=""><br class=""></div><div class="">However, I asked Robert Oostenveld to add my file format and he did. I might have to add that I work at the same Uni as he does and I was able to do it in person. I guess you can at least ask.</div><div class=""><br class=""></div><div class="">Best,</div><div class="">Katharina <br class=""><div><blockquote type="cite" class=""><div class="">On 11 Aug 2016, at 20:23, Bahareh Elahian (belahian) <<a href="mailto:belahian@memphis.edu" class="">belahian@memphis.edu</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div id="divtagdefaultwrapper" style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; font-size: 12pt; background-color: rgb(255, 255, 255); font-family: Calibri, Arial, Helvetica, sans-serif;" class=""><div style="margin-top: 0px; margin-bottom: 0px;" class="">I did something and it works but it is not correct .</div><div style="margin-top: 0px; margin-bottom: 0px;" class="">I specified cfg.trl = data.trial{1,1}</div><div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class=""></div><p style="margin-top: 0px; margin-bottom: 0px;" class=""></p><div class="">cfg = [];</div><div class="">cfg.bpfilter = 'yes';</div><div class="">cfg.demean = 'yes';</div><div class="">data.trial{1,1} = eeg.eeg_data;</div><div class="">cfg.trl = data.trial{1,1};</div><div class="">data.time{1,1} = 1:size(eeg.eeg_data,2);</div><div class="">data.label{1,1} = 'chan 1';</div><div class="">data.label{2,1} = 'chan 2';</div><div class="">data.label{3,1} = 'chan 3';</div><div class="">data.label{4,1} = 'chan 4';</div><div class="">data.label{5,1} = 'chan 5';</div><div class="">data.label{6,1} = 'chan 6';</div><div class="">data.label{7,1} = 'chan 7';</div><div class="">data.label{8,1} = 'chan 8';</div><div class="">data.fsample = eeg.samp_rate;</div><div class="">newdata = ft_redefinetrial(cfg,data);</div><div class=""><br class=""></div><div class="">the newdata.time and newdata.trial are <1*8 cell > . some of the cells are empty and one is NAN.</div><div class=""><br class=""></div><br class=""><p style="margin-top: 0px; margin-bottom: 0px;" class=""></p></div><hr tabindex="-1" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; display: inline-block; width: 697.75px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class=""></span><div id="divRplyFwdMsg" dir="ltr" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><font face="Calibri, sans-serif" style="font-size: 11pt;" class=""><b class="">From:</b><span class="Apple-converted-space"> </span><a href="mailto:fieldtrip-bounces@science.ru.nl" class="">fieldtrip-bounces@science.ru.nl</a><span class="Apple-converted-space"> </span><<a href="mailto:fieldtrip-bounces@science.ru.nl" class="">fieldtrip-bounces@science.ru.nl</a>> on behalf of Bahareh Elahian (belahian) <<a href="mailto:belahian@memphis.edu" class="">belahian@memphis.edu</a>><br class=""><b class="">Sent:</b><span class="Apple-converted-space"> </span>Thursday, August 11, 2016 2:00:52 PM<br class=""><b class="">To:</b><span class="Apple-converted-space"> </span>FieldTrip discussion list<br class=""><b class="">Subject:</b><span class="Apple-converted-space"> </span>Re: [FieldTrip] reading .mat in fieldtrip</font><div class=""> </div></div><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><div id="divtagdefaultwrapper" style="font-size: 12pt; background-color: rgb(255, 255, 255); font-family: Calibri, Arial, Helvetica, sans-serif;" class=""><div style="margin-top: 0px; margin-bottom: 0px;" class="">Thanks but none of the options works.</div><div style="margin-top: 0px; margin-bottom: 0px;" class="">The error is :</div><div style="margin-top: 0px; margin-bottom: 0px;" class=""><span class="">you should specify at least one configuration option.</span><br class=""></div><div style="margin-top: 0px; margin-bottom: 0px;" class=""><span class=""><br class=""></span></div><div style="margin-top: 0px; margin-bottom: 0px;" class=""><span class="">Even <span class="">cfg.demean = 'yes'; is not enough.</span></span></div><div style="margin-top: 0px; margin-bottom: 0px;" class=""><span class=""><span class=""><br class=""></span></span></div></div><hr tabindex="-1" style="display: inline-block; width: 697.75px;" class=""><div id="divRplyFwdMsg" dir="ltr" class=""><font face="Calibri, sans-serif" style="font-size: 11pt;" class=""><b class="">From:</b><span class="Apple-converted-space"> </span><a href="mailto:fieldtrip-bounces@science.ru.nl" class="">fieldtrip-bounces@science.ru.nl</a><span class="Apple-converted-space"> </span><<a href="mailto:fieldtrip-bounces@science.ru.nl" class="">fieldtrip-bounces@science.ru.nl</a>> on behalf of Antonio Rodriguez <<a href="mailto:toni.rbaena@gmail.com" class="">toni.rbaena@gmail.com</a>><br class=""><b class="">Sent:</b><span class="Apple-converted-space"> </span>Thursday, August 11, 2016 1:47:18 PM<br class=""><b class="">To:</b><span class="Apple-converted-space"> </span>FieldTrip discussion list<br class=""><b class="">Subject:</b><span class="Apple-converted-space"> </span>Re: [FieldTrip] reading .mat in fieldtrip</font><div class=""> </div></div><div class=""><div style="margin-top: 0px; margin-bottom: 0px;" class="">Hi.</div><div style="margin-top: 0px; margin-bottom: 0px;" class="">You can create an empty cfg structure, and fill with data :</div><div style="margin-top: 0px; margin-bottom: 0px;" class="">cfg =[];<br class="">newdata = ft_redefinetrial(cfg,data);</div><div class="gmail_extra"><br class=""><div class="gmail_quote">El 11 ago. 2016 7:11 p. m., "Bahareh Elahian (belahian)" <<a href="mailto:belahian@memphis.edu" class="">belahian@memphis.edu</a>> escribió:<br type="attribution" class=""><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;"><div dir="auto" class=""><div class=""><div style="direction: ltr;" class="">Thanks for the answer,</div><div style="direction: ltr;" class=""> </div><div style="direction: ltr;" class="">I have had a look on this page before and I tried to follow the steps.</div><div style="direction: ltr;" class="">The problem is ;I do not have any cfg to define cfg.trl and use <span style="text-align: justify; background-color: rgba(255, 255, 255, 0);" class="">newdata = ft_redefinetrial(cfg,data);</span></div><div style="direction: ltr;" class=""><span style="text-align: justify; background-color: rgba(255, 255, 255, 0);" class=""><br class=""></span></div><div style="text-align: justify; direction: ltr;" class="">Any other idea?</div><br class=""><br class=""></div><div class=""><br class="">On Aug 11, 2016, at 11:36 AM, Arjen Stolk <<a href="mailto:a.stolk8@gmail.com" target="_blank" class="">a.stolk8@gmail.com</a>> wrote:<br class=""><br class=""></div><blockquote type="cite" class=""><div class=""><div dir="ltr" class="">Hi Bahareh,<div class=""><br class=""></div><div class="">To get you started, see this page:</div><div class=""><a href="http://www.fieldtriptoolbox.org/faq/how_can_i_import_my_own_dataformat" target="_blank" class="">http://www.fieldtriptoolbox.<wbr class="">org/faq/how_can_i_import_my_<wbr class="">own_dataformat</a><br class=""></div><div class=""><br class=""></div><div class="">It describes what fieldtrip expects your raw data to look like.</div><div class=""><br class=""></div><div class="">Arjen</div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">2016-08-11 8:42 GMT-07:00 Bahareh Elahian (belahian)<span class="Apple-converted-space"> </span><span dir="ltr" class=""><<a href="mailto:belahian@memphis.edu" target="_blank" class="">belahian@memphis.edu</a>></span>:<br class=""><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;"><div lang="EN-US" link="#0563C1" vlink="#954F72" class=""><div class=""><div style="margin-top: 0px; margin-bottom: 0px;" class="">Hi All,<u class=""></u><u class=""></u></div><div style="margin-top: 0px; margin-bottom: 0px;" class=""><u class=""></u> <u class=""></u></div><div style="margin-top: 0px; margin-bottom: 0px;" class="">I have a “.mat” file which contais:<span class="Apple-converted-space"> </span><span style="background-color: white;" class=""><8x10350000 double> and sampling rate.<u class=""></u><u class=""></u></span></div><div style="margin-top: 0px; margin-bottom: 0px;" class=""><span style="background-color: white;" class="">How should I import this data to field trip? By using <span class="Apple-converted-space"> </span></span><span style="font-size: 10pt; font-family: 'Courier New';" class="">[data] = ft_preprocessing( cfg);</span><span style="font-size: 12pt; font-family: 'Courier New';" class=""><u class=""></u><u class=""></u></span></div><div style="margin-top: 0px; margin-bottom: 0px;" class=""><span style="background-color: white;" class=""> I am getting an error that the data should be in the format of raw or raw + comp. <u class=""></u><u class=""></u></span></div><div style="margin-top: 0px; margin-bottom: 0px;" class=""><span style="background-color: white;" class=""><u class=""></u> <u class=""></u></span></div><div style="margin-top: 0px; margin-bottom: 0px;" class=""><span style="background-color: white;" class="">Any idea?<u class=""></u><u class=""></u></span></div><div style="margin-top: 0px; margin-bottom: 0px;" class=""><span style="background-color: white;" class=""><u class=""></u> <u class=""></u></span></div><div style="margin-top: 0px; margin-bottom: 0px;" class=""><span style="background-color: white;" class="">Thanks!<u class=""></u><u class=""></u></span></div><div style="margin-top: 0px; margin-bottom: 0px;" class=""><span style="background-color: white;" class=""><u class=""></u> <u class=""></u></span></div><div style="margin-top: 0px; margin-bottom: 0px;" class=""><u class=""></u> <u class=""></u></div></div></div><br class="">______________________________<wbr class="">_________________<br class="">fieldtrip mailing list<br class=""><a href="mailto:fieldtrip@donders.ru.nl" target="_blank" class="">fieldtrip@donders.ru.nl</a><br class=""><a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" rel="noreferrer" target="_blank" class="">https://mailman.science.ru.nl/<wbr class="">mailman/listinfo/fieldtrip</a><br class=""></blockquote></div><br class=""></div></div></blockquote><blockquote type="cite" class=""><div class=""><span class="">______________________________<wbr class="">_________________</span><br class=""><span class="">fieldtrip mailing list</span><br class=""><span class=""><a href="mailto:fieldtrip@donders.ru.nl" target="_blank" class="">fieldtrip@donders.ru.nl</a></span><br class=""><span class=""><a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank" class="">https://mailman.science.ru.nl/<wbr class="">mailman/listinfo/fieldtrip</a></span></div></blockquote></div><br class="">______________________________<wbr class="">_________________<br class="">fieldtrip mailing list<br class=""><a href="mailto:fieldtrip@donders.ru.nl" class="">fieldtrip@donders.ru.nl</a><br class=""><a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" rel="noreferrer" target="_blank" class="">https://mailman.science.ru.nl/<wbr class="">mailman/listinfo/fieldtrip</a><br class=""></blockquote></div></div></div></div><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">_______________________________________________</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">fieldtrip mailing list</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><a href="mailto:fieldtrip@donders.ru.nl" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">fieldtrip@donders.ru.nl</a><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a></div></blockquote></div><br class=""></div></body></html>