<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Helvetica;
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
        {font-family:Helvetica;
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:10.0pt;
        margin-left:36.0pt;
        mso-add-space:auto;
        text-align:justify;
        line-height:16.0pt;
        mso-line-height-rule:exactly;
        font-size:13.0pt;
        font-family:"Helvetica","sans-serif";
        mso-fareast-language:EN-US;}
p.MsoListParagraphCxSpFirst, li.MsoListParagraphCxSpFirst, div.MsoListParagraphCxSpFirst
        {mso-style-priority:34;
        mso-style-type:export-only;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        margin-bottom:.0001pt;
        mso-add-space:auto;
        text-align:justify;
        line-height:16.0pt;
        mso-line-height-rule:exactly;
        font-size:13.0pt;
        font-family:"Helvetica","sans-serif";
        mso-fareast-language:EN-US;}
p.MsoListParagraphCxSpMiddle, li.MsoListParagraphCxSpMiddle, div.MsoListParagraphCxSpMiddle
        {mso-style-priority:34;
        mso-style-type:export-only;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        margin-bottom:.0001pt;
        mso-add-space:auto;
        text-align:justify;
        line-height:16.0pt;
        mso-line-height-rule:exactly;
        font-size:13.0pt;
        font-family:"Helvetica","sans-serif";
        mso-fareast-language:EN-US;}
p.MsoListParagraphCxSpLast, li.MsoListParagraphCxSpLast, div.MsoListParagraphCxSpLast
        {mso-style-priority:34;
        mso-style-type:export-only;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:10.0pt;
        margin-left:36.0pt;
        mso-add-space:auto;
        text-align:justify;
        line-height:16.0pt;
        mso-line-height-rule:exactly;
        font-size:13.0pt;
        font-family:"Helvetica","sans-serif";
        mso-fareast-language:EN-US;}
span.E-MailFormatvorlage17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:1372608661;
        mso-list-type:hybrid;
        mso-list-template-ids:-926397792 67567631 67567641 67567643 67567631 67567641 67567643 67567631 67567641 67567643;}
@list l0:level1
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level2
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level3
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level4
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level5
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level6
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level7
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level8
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level9
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="DE" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-GB">Dear fieldtrip community,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">My name is Manuel Bange and I am working in the Movement Disorder and Neurostimulation Lab in Mainz, Germany. Currently I am working on a project where we recorded EEG and EMG data combined with simultaneously recorded
 ground reaction forces during walking on a treadmill. I intend to use complete gait cycles as trials in order to, for example, calculate the inter-trial coherence. The issue I now face is that every cycle lasts a different amount of time.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">In a first step I have separated the continuous data into trials that correspond to whole gait cycles. One cycle starts with the onset of the right foot and ends one sample before the following onset of the same foot.
 This results in a number of trials (around 18 per subject) of different lengths.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">Following this, I performed a time-frequency analysis for each individual trial by
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoListParagraphCxSpFirst" style="text-indent:-18.0pt;mso-list:l0 level1 lfo1">
<![if !supportLists]><span lang="EN-GB" style="font-size:11.0pt;font-family:"Calibri","sans-serif""><span style="mso-list:Ignore">1.<span style="font:7.0pt "Times New Roman"">      
</span></span></span><![endif]><span lang="EN-GB" style="font-size:11.0pt;font-family:"Calibri","sans-serif"">selecting a specific trial
<o:p></o:p></span></p>
<p class="MsoListParagraphCxSpMiddle"><i><span lang="EN-GB" style="font-size:11.0pt;font-family:"Calibri","sans-serif"">cfg.trials      = 2;                                                               % select a a trial, here trial 2<o:p></o:p></span></i></p>
<p class="MsoListParagraphCxSpMiddle" style="margin-bottom:0cm;margin-bottom:.0001pt;mso-add-space:auto">
<i><span lang="EN-GB" style="font-size:11.0pt;font-family:"Calibri","sans-serif"">trial2 = ft_selectdata(cfg, data)<o:p></o:p></span></i></p>
<p class="MsoListParagraphCxSpMiddle" style="margin-bottom:0cm;margin-bottom:.0001pt;mso-add-space:auto">
<i><span lang="EN-GB" style="font-size:11.0pt;font-family:"Calibri","sans-serif""><o:p> </o:p></span></i></p>
<p class="MsoListParagraphCxSpMiddle" style="text-indent:-18.0pt;mso-list:l0 level1 lfo1">
<![if !supportLists]><span lang="EN-GB" style="font-size:11.0pt;font-family:"Calibri","sans-serif""><span style="mso-list:Ignore">2.<span style="font:7.0pt "Times New Roman"">      
</span></span></span><![endif]><span lang="EN-GB" style="font-size:11.0pt;font-family:"Calibri","sans-serif"">performing time-frequency analysis<o:p></o:p></span></p>
<p class="MsoListParagraphCxSpMiddle"><i><span lang="EN-GB" style="font-size:11.0pt;font-family:"Calibri","sans-serif"">cfg          = [];<o:p></o:p></span></i></p>
<p class="MsoListParagraphCxSpMiddle"><i><span lang="EN-GB" style="font-size:11.0pt;font-family:"Calibri","sans-serif"">cfg.output   = 'pow';<o:p></o:p></span></i></p>
<p class="MsoListParagraphCxSpMiddle"><i><span lang="EN-GB" style="font-size:11.0pt;font-family:"Calibri","sans-serif"">cfg.method   = 'mtmconvol';<o:p></o:p></span></i></p>
<p class="MsoListParagraphCxSpMiddle"><i><span lang="EN-GB" style="font-size:11.0pt;font-family:"Calibri","sans-serif"">cfg.taper    = 'hanning';<o:p></o:p></span></i></p>
<p class="MsoListParagraphCxSpMiddle"><i><span lang="EN-GB" style="font-size:11.0pt;font-family:"Calibri","sans-serif"">cfg.foi      = [1:1:40];<o:p></o:p></span></i></p>
<p class="MsoListParagraphCxSpMiddle"><i><span lang="EN-GB" style="font-size:11.0pt;font-family:"Calibri","sans-serif"">cfg.t_ftimwin    = ones(length(cfg.foi),1).*1;<o:p></o:p></span></i></p>
<p class="MsoListParagraphCxSpMiddle"><i><span lang="EN-GB" style="font-size:11.0pt;font-family:"Calibri","sans-serif"">cfg.toi          = trial2.time{1,1}(1,125):0.01:trial2.time{1,1}(1,end-125-1);           
<o:p></o:p></span></i></p>
<p class="MsoListParagraphCxSpMiddle"><i><span lang="EN-GB" style="font-size:11.0pt;font-family:"Calibri","sans-serif"">cfg.keeptrials = 'yes'<o:p></o:p></span></i></p>
<p class="MsoListParagraphCxSpLast"><i><span lang="EN-GB" style="font-size:11.0pt;font-family:"Calibri","sans-serif"">data_tfa1     = ft_freqanalysis(cfg, trial2);<o:p></o:p></span></i></p>
<p class="MsoNormal"><i><span lang="EN-GB">resulting in<o:p></o:p></span></i></p>
<p class="MsoNormal"><i><span lang="EN-GB">  data_tfa1 = <o:p></o:p></span></i></p>
<p class="MsoNormal"><i><span lang="EN-GB">  struct with fields:<o:p></o:p></span></i></p>
<p class="MsoNormal" style="text-indent:35.4pt"><i><span lang="EN-GB">label: {257×1 cell}<o:p></o:p></span></i></p>
<p class="MsoNormal" style="text-indent:35.4pt"><i><span lang="EN-GB">dimord: 'rpt_chan_freq_time'<o:p></o:p></span></i></p>
<p class="MsoNormal" style="text-indent:35.4pt"><i><span lang="EN-GB">freq: [1×40 double]<o:p></o:p></span></i></p>
<p class="MsoNormal" style="text-indent:35.4pt"><i><span lang="EN-GB">time: [1×172 double]                                                                    % differs for each trial<o:p></o:p></span></i></p>
<p class="MsoNormal" style="text-indent:35.4pt"><i><span lang="EN-GB">powspctrm: [1×257×40×172 double]<o:p></o:p></span></i></p>
<p class="MsoNormal" style="text-indent:35.4pt"><i><span lang="EN-GB">cumtapcnt: [1×40 double]<o:p></o:p></span></i></p>
<p class="MsoNormal" style="text-indent:35.4pt"><i><span lang="EN-GB">cfg: [1×1 struct]<o:p></o:p></span></i></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">Now my question is:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">Is there a way to normalise this data over the time-axis, so that all trials have the same length? This is important to calculate an average time-frequency representation, or in another step, to calculate the inter-trial
 coherence. I have thought of normalising the time axis and interpolating the corresponding power-values.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">Thanks and best regards, <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:black;mso-fareast-language:DE">Manuel Bange<o:p></o:p></span></p>
<div style="mso-element:para-border-div;border:none;border-bottom:solid windowtext 1.0pt;padding:0cm 0cm 1.0pt 0cm">
<p class="MsoNormal" style="border:none;padding:0cm"><span lang="EN-US" style="color:black;mso-fareast-language:DE">M.Sc. Sports Science<o:p></o:p></span></p>
<p class="MsoNormal" style="border:none;padding:0cm"><span lang="EN-US" style="color:black;mso-fareast-language:DE"><o:p> </o:p></span></p>
</div>
<p class="MsoNormal"><span lang="EN-US" style="color:black;mso-fareast-language:DE"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:black;mso-fareast-language:DE">Johannes-Gutenberg-University Hospital<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:black;mso-fareast-language:DE">Movement Disorders and Neurostimulation<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:black;mso-fareast-language:DE">Department of Neurology<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black;mso-fareast-language:DE">Langenbeckstr. 1</span><span style="color:black;mso-fareast-language:DE"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black;mso-fareast-language:DE">55131 Mainz, Germany<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black;mso-fareast-language:DE"><a href="www.unimedizin-mainz.de">www.unimedizin-mainz.de</a><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black;mso-fareast-language:DE"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:black;mso-fareast-language:DE">Email:
</span><span style="color:black;mso-fareast-language:DE"><a href="manuel.bange@unimedizin-mainz.de"><span lang="EN-US">manuel.bange@unimedizin-mainz.de</span></a></span><span lang="EN-US" style="color:black;mso-fareast-language:DE"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
</div>
</body>
</html>