<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi Mona, <div class=""><div class=""><br class=""></div><div class="">if you do</div><div class="">cfg=[];</div><div class="">all=ft_appenddata(cfg, data1, data2, data3, data4); </div></div><div class=""><br class=""></div><div class="">you get among the other fields</div><div class="">all=</div><div class="">time: <span class="Apple-tab-span" style="white-space:pre">        </span>{1x4 cell} %assuming each dataset equals one trial, which is what you want to replace.</div><div class=""><br class=""></div><div class="">you could try to create a matrix, based on your sampling rate with all the continuous time points, here just for illustration: </div><div class="">all_timepoints=[0:0.025:9.975]  %<b class="">adapt to your sampling rate and length of data</b>, be very sure the end of one file is the beginning of the next one. (This is giving you all points from 0 to 9.975 with steps of 0.025)</div><div class="">trl_timepoints=mat2cell(all_timepoints, 1, [100 100 100 100]) %here I create 4 cell arrays, corresponding e.g. to 4 trials</div><div class=""><br class=""></div><div class="">will result in</div><div class=""><div class="">trl_timepoints = </div><div class="">    [1x100 double]    [1x100 double]    [1x100 double]    [1x100 double] </div></div><div class=""><br class=""></div><div class="">with continuous time information (trial 1 starts at 0, trial 2 at 2.5, trials 3 at 5, and trial 4 at 7.5) of the same length.</div><div class="">this you can then use to replace the original time information:</div><div class=""><br class=""></div><div class="">all_data.time_old=all_data.time %if you want to keep the original time information</div><div class="">all_data.time=trl_timepoints</div><div class=""><br class=""></div><div class=""><b class="">In general: </b>are you really sure that you need the continuous time information? There are many processing and analyses steps that can be done on the appended time information…</div><div class=""><br class=""></div><div class="">There might be more elegant ways to do this.</div><div class=""><br class=""></div><div class="">Hope there is no typo and that it helps</div><div class="">Best Anne</div><div class=""><br class=""></div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">Am 28.10.2016 um 00:48 schrieb Wong-Barnum, Mona <<a href="mailto:mona@sdsc.edu" class="">mona@sdsc.edu</a>>:</div><br class="Apple-interchange-newline"><div class=""><div class=""><br class="">Hi:<br class=""><br class=""><span class="Apple-tab-span" style="white-space:pre">    </span>I need a way to “stitch” together a single subject’s data recorded over many hours which were saved in 14 separate files.  When stitched together, file 1 end time is the start time of file 2, file 2 end time is the start of file 3, and so on.  Unfortunately the recorded files all start at time t = 0 so ft_appenddata() put them into 14 separate trials.  I need to shift the time for each file so they will be jointed into a single trial.  I didn’t find any ft_ function to do this.  Any suggestions?<br class=""><br class="">thanks,<br class="">Mona<br class=""><br class="">************************************************<br class="">    Mona Wong<br class="">    Web & iPad Application Developer<br class="">    San Diego Supercomputer Center<br class=""><br class="">    You are the light you wish to see.<br class="">************************************************<br class=""><br class=""><br class=""><br class=""><br class="">_______________________________________________<br class="">fieldtrip mailing list<br class=""><a href="mailto:fieldtrip@donders.ru.nl" class="">fieldtrip@donders.ru.nl</a><br class="">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</div></div></blockquote></div><br class=""></div></body></html>