<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="">
Dear Manuela,
<div class=""><br class="">
</div>
<div class="">This looks like a typo in the code, which I will fix (and once fixed will become available in the daily release version of the code). To give myself some time: probably not tonight, but perhaps after the weekend :). However, the fact that this
part of the code clearly doesn’t work, I am not entirely sure whether the rest will work smoothly as well, as soon as the current hurdle is fixed. But let’s see</div>
<div class=""><br class="">
</div>
<div class="">Best wishes,</div>
<div class="">Jan-Mathijs</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">
<div>
<blockquote type="cite" class="">
<div class="">On 29 Aug 2018, at 13:34, Manuela Costa <<a href="mailto:manuela.costa@ctb.upm.es" class="">manuela.costa@ctb.upm.es</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div dir="ltr" class="">
<div dir="ltr" class="">
<div style="margin: 0cm 0cm 0.0001pt; line-height: normal; background-color: white; font-size: 11pt; font-family: Calibri, sans-serif; background-position: initial initial; background-repeat: initial initial;" class="">
<span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New';" class="">Dear community,<span class=""></span></span></div>
<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';" class=""><span class=""> </span></span></p>
<div style="margin: 0cm 0cm 0.0001pt; line-height: normal; background-color: white; font-size: 11pt; font-family: Calibri, sans-serif; background-position: initial initial; background-repeat: initial initial;" class="">
<span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New';" class="">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></div>
<div style="margin: 0cm 0cm 0.0001pt; line-height: normal; background-color: white; font-size: 11pt; font-family: Calibri, sans-serif; background-position: initial initial; background-repeat: initial initial;" class="">
<span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New';" class=""><br class="">
</span></div>
<div style="margin: 0cm 0cm 0.0001pt; line-height: normal; background-color: white; font-size: 11pt; font-family: Calibri, sans-serif; background-position: initial initial; background-repeat: initial initial;" class="">
<span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New';" class="">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="font-family: 'Courier New'; font-size: 10pt;" class="">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></div>
<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';" class=""><span class=""> </span></span></p>
<div style="margin: 0cm 0cm 0.0001pt; line-height: normal; background-color: white; font-size: 11pt; font-family: Calibri, sans-serif; background-position: initial initial; background-repeat: initial initial;" class="">
<span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New';" class="">Best wishes,<span class=""></span></span></div>
<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';" class=""><span class=""> </span></span></p>
<div style="margin: 0cm 0cm 0.0001pt; line-height: normal; background-color: white; font-size: 11pt; font-family: Calibri, sans-serif; background-position: initial initial; background-repeat: initial initial;" class="">
<span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New';" class="">Manuela Costa<span class=""></span></span></div>
<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';" class=""><span class=""> </span></span></p>
<div style="margin: 0cm 0cm 0.0001pt; line-height: normal; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New';" class="">Configuration structure:<span class=""></span></span></div>
<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';" class=""><span class=""> </span></span></p>
<div style="margin: 0cm 0cm 0.0001pt; line-height: normal; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New';" class="">cfg = [];<span class=""></span></span></div>
<div style="margin: 0cm 0cm 0.0001pt; line-height: normal; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New';" class=""><span class="">
</span>cfg.toolbox = 'bsmart';<span class=""></span></span></div>
<div style="margin: 0cm 0cm 0.0001pt; line-height: normal; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New';" class=""><span class="">
</span>cfg.order<span class=""> </span>= 10;<span class=""></span></span></div>
<div style="margin: 0cm 0cm 0.0001pt; line-height: normal; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New';" class=""><span class="">
</span>cfg.toi<span class=""> </span>= -0.5:0.01:3; %% the time points at which the windows are centered<span class=""></span></span></div>
<div style="margin: 0cm 0cm 0.0001pt; line-height: normal; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New';" class=""><span class="">
</span>cfg.t_ftimwin = 0.25; %% length of time window in second<span class=""></span></span></div>
<div style="margin: 0cm 0cm 0.0001pt; line-height: normal; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New';" class=""><span class="">
</span>mdata_emotional_Rem{subj} = ft_mvaranalysis(cfg, preprocessing_emotional_Rem_<wbr class="">ds{subj});<span class=""></span></span></div>
<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';" class=""><span class=""> </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';" class=""><span class=""> </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';" class=""><span class=""> </span></span></p>
<pre style="margin:0cm 0cm 0.0001pt;font-size:10pt;font-family:"Courier New"" class=""><span style="" class="">Error message:<span class=""></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';" class=""><span class=""> </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';" class=""><span class=""> </span></span></p>
<div style="margin: 0cm 0cm 0.0001pt; line-height: normal; background-color: white; font-size: 11pt; font-family: Calibri, sans-serif; background-position: initial initial; background-repeat: initial initial;" class="">
<span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New';" class="">Matrix dimensions must agree.<span class=""></span></span></div>
<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';" class=""><span class=""> </span></span></p>
<div style="margin: 0cm 0cm 0.0001pt; line-height: normal; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New';" class="">Error in ft_mvaranalysis (line 185)<span class=""></span></span></div>
<div style="margin: 0cm 0cm 0.0001pt; line-height: normal; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New';" class="">latency(k,:) = cfg.toi + cfg.t_ftimwin.*[-0.5 0.5];<span class=""></span></span></div>
<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';" class=""><span class=""> </span></span></p>
<div style="margin: 0cm 0cm 0.0001pt; line-height: normal; background-color: white; font-size: 11pt; font-family: Calibri, sans-serif; background-position: initial initial; background-repeat: initial initial;" class="">
<span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New';" class="">Error in Step2_Calculate_Granger_time_<wbr class="">freq(line 108)<span class=""></span></span></div>
<div style="margin: 0cm 0cm 0.0001pt; line-height: normal; background-color: white; font-size: 11pt; font-family: Calibri, sans-serif; background-position: initial initial; background-repeat: initial initial;" class="">
<span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New';" class=""> mdata_emotional_Rem{subj} = ft_mvaranalysis(cfg,<wbr class="">preprocessing_emotional_Rem_<wbr class="">ds{subj});<span class=""></span></span></div>
<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';" class=""><span class=""> </span></span></p>
<div style="margin: 0cm 0cm 0.0001pt; line-height: normal; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<br class="">
<br class="">
</div>
</div>
</div>
_______________________________________________<br class="">
fieldtrip mailing list<br class="">
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" class="">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br class="">
https://doi.org/10.1371/journal.pcbi.1002202<br class="">
</div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>