<div dir="ltr"><div dir="ltr">
<p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;line-height:normal;background:white;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-US" style="font-size:10pt;font-family:"Courier New";color:black">Dear community,<span></span></span></p>
<p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;line-height:normal;background:white;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-US" style="font-size:10pt;font-family:"Courier New";color:black"><span> </span></span></p>
<p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;line-height:normal;background:white;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-US" style="font-size:10pt;font-family:"Courier New";color:black">I'm planning to do granger causality
analysis on human iEEG data. I'm using ft_mvaranalysis to get time-dependent
coefficient sets based on a sliding window, but I get an error. </span></p><p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;line-height:normal;background:white;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-US" style="font-size:10pt;font-family:"Courier New";color:black"><br></span></p><p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;line-height:normal;background:white;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-US" style="font-size:10pt;font-family:"Courier New";color:black">The data is
downsampled at 250 Hz. The fields of my data structure are fsample, trial,
time, label and cfg. The size of preprocessing_emotional_Rem_ds{1}.trial{1} </span><span style="color:black;font-family:"Courier New";font-size:10pt">is 3x3751 (channels, data points). Below is the configuration structure and the
error message. The ft_mvaranalysis function works if I do not use the sliding
window approach. I tried to use different cfg.toi and cfg.t_ftimwin but I could
not find a solution. I hope you can help me.</span></p>
<p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;line-height:normal;background:white;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-US" style="font-size:10pt;font-family:"Courier New";color:black"><span> </span></span></p>
<p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;line-height:normal;background:white;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-US" style="font-size:10pt;font-family:"Courier New";color:black">Best wishes,<span></span></span></p>
<p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;line-height:normal;background:white;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-US" style="font-size:10pt;font-family:"Courier New";color:black"><span> </span></span></p>
<p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;line-height:normal;background:white;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-US" style="font-size:10pt;font-family:"Courier New";color:black">Manuela Costa<span></span></span></p>
<p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;line-height:normal;font-size:11pt;font-family:Calibri,sans-serif"><span style="font-size:10pt;font-family:"Courier New";color:black"><span> </span></span></p>
<p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;line-height:normal;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-US" style="font-size:10pt;font-family:"Courier New";color:black">Configuration
structure:<span></span></span></p>
<p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;line-height:normal;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-US" style="font-size:10pt;font-family:"Courier New";color:black"><span> </span></span></p>
<p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;line-height:normal;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-US" style="font-size:10pt;font-family:"Courier New";color:black">cfg = [];<span></span></span></p>
<p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;line-height:normal;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-US" style="font-size:10pt;font-family:"Courier New";color:black"><span> </span>cfg.toolbox = 'bsmart';<span></span></span></p>
<p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;line-height:normal;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-US" style="font-size:10pt;font-family:"Courier New";color:black"><span> </span>cfg.order<span>
</span>= 10;<span></span></span></p>
<p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;line-height:normal;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-US" style="font-size:10pt;font-family:"Courier New";color:black"><span> </span>cfg.toi<span> </span>= -0.5:0.01:3; %% the time points at
which the windows are centered<span></span></span></p>
<p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;line-height:normal;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-US" style="font-size:10pt;font-family:"Courier New";color:black"><span> </span>cfg.t_ftimwin = 0.25; %% length of time
window in second<span></span></span></p>
<p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;line-height:normal;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-US" style="font-size:10pt;font-family:"Courier New";color:black"><span> </span>mdata_emotional_Rem{subj} = ft_mvaranalysis(cfg,
preprocessing_emotional_Rem_<wbr>ds{subj});<span></span></span></p>
<p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;line-height:normal;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-US" style="font-size:10pt;font-family:"Courier New";color:black"><span> </span></span></p>
<p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;line-height:normal;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-US" style="font-size:10pt;font-family:"Courier New";color:black"><span> </span></span></p>
<p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;line-height:normal;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-US" style="font-size:10pt;font-family:"Courier New";color:black"><span> </span></span></p>
<pre style="margin:0cm 0cm 0.0001pt;font-size:10pt;font-family:"Courier New""><span style="color:black">Error message:<span></span></span></pre>
<p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;line-height:normal;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-US" style="font-size:10pt;font-family:"Courier New";color:black"><span> </span></span></p>
<p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;line-height:normal;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-US" style="font-size:10pt;font-family:"Courier New";color:black"><span> </span></span></p>
<p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;line-height:normal;background:white;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-US" style="font-size:10pt;font-family:"Courier New";color:black">Matrix dimensions must agree.<span></span></span></p>
<p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;line-height:normal;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-US" style="font-size:10pt;font-family:"Courier New";color:black"><span> </span></span></p>
<p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;line-height:normal;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-US" style="font-size:10pt;font-family:"Courier New";color:black">Error in ft_mvaranalysis (line 185)<span></span></span></p>
<p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;line-height:normal;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-US" style="font-size:10pt;font-family:"Courier New";color:black">latency(k,:) = cfg.toi + cfg.t_ftimwin.*[-0.5
0.5];<span></span></span></p>
<p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;line-height:normal;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-US" style="font-size:10pt;font-family:"Courier New";color:black"><span> </span></span></p>
<p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;line-height:normal;background:white;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-US" style="font-size:10pt;font-family:"Courier New";color:black">Error in Step2_Calculate_Granger_time_<wbr>freq(line
108)<span></span></span></p>
<p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;line-height:normal;background:white;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-US" style="font-size:10pt;font-family:"Courier New";color:black"> mdata_emotional_Rem{subj} =
ft_mvaranalysis(cfg,<wbr>preprocessing_emotional_Rem_<wbr>ds{subj});<span></span></span></p>
<p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;line-height:normal;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-US" style="font-size:10pt;font-family:"Courier New";color:black"><span> </span></span></p>
<p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;line-height:normal;font-size:11pt;font-family:Calibri,sans-serif"><br><br></p></div></div>