<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
Hi Bushra,
<div class=""><br class="">
</div>
<div class="">Can you please specify the cfg to ft_freqstatistics as well? Otherwise, we don’t know what you did exactly.</div>
<div class=""><br class="">
</div>
<div class="">Also, ft_freqstatistics with cfg.statistic = ’indepsamplesZcoh’ requires frequency data that has been computed with ‘fourier’ rather than ‘powandcsd’ as cfg.method for ft_freqanalysis</div>
<div class=""><br class="">
</div>
<div class="">Best wishes,</div>
<div class="">Jan_Mathijs</div>
<div class=""><br class="">
<div><br class="">
<blockquote type="cite" class="">
<div class="">On 14 May 2021, at 13:36, Bushra Riaz Syeda <<a href="mailto:bushra.riaz@gu.se" class="">bushra.riaz@gu.se</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class="">
<span style="font-family: calibri, arial, helvetica, sans-serif; font-size: 12pt; background-color: rgba(0, 0, 0, 0);" class="">Hello,</span></div>
<div style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class="">
<span style="font-family: calibri, arial, helvetica, sans-serif; font-size: 12pt; background-color: rgba(0, 0, 0, 0);" class="">I am trying to do the analysis based on the paper </span><span style="font-family: calibri, arial, helvetica, sans-serif; font-size: 12pt; background-color: rgba(0, 0, 0, 0);" class=""><span style="font-variant-ligatures: inherit; font-variant-caps: inherit;" class="">"nonparametric
 statistical testing of coherence differences" in fieldtrip for comparing differences between two conditions on single subject level.</span></span></div>
<div style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class="">
<span style="font-size: 12pt; font-variant-ligatures: inherit; font-variant-caps: inherit;" class=""><br class="">
</span></div>
<div style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class="">
<span style="font-family: calibri, arial, helvetica, sans-serif; font-size: 12pt; background-color: rgba(0, 0, 0, 0);" class=""><span style="font-variant-ligatures: inherit; font-variant-caps: inherit;" class="">I am using the following code</span></span></div>
<div style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class="">
<span style="font-family: calibri, arial, helvetica, sans-serif; font-size: 12pt; background-color: rgba(0, 0, 0, 0);" class=""><span style="font-variant-ligatures: inherit; font-variant-caps: inherit;" class=""><br class="">
</span></span></div>
<div style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class="">
<i style="font-size: 12pt; font-variant-ligatures: inherit; font-variant-caps: inherit; font-weight: inherit;" class="">
<div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Courier;" class="">
cfg<span class="Apple-converted-space">           <span class="Apple-converted-space"> </span></span>= [];</div>
<div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Courier;" class="">
cfg.method =<span class="Apple-converted-space"> </span><span class="s1" style="color: rgb(160, 32, 240);">'montecarlo'</span>;</div>
<div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Courier; color: rgb(160, 32, 240);" class="">
<span class="s2" style="">cfg.statistic =<span class="Apple-converted-space"> </span></span>'indepsamplesZcoh'<span class="s2" style="">;</span></div>
<div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Courier;" class="">
cfg.design(1,1:148)=1;</div>
<div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Courier;" class="">
cfg.design(1,149:296)=2;</div>
<div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Courier;" class="">
cfg.numrandomization = 1000;</div>
<div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Courier;" class="">
cfg.correctm<span class="Apple-converted-space"> </span><span class="Apple-converted-space">       <span class="Apple-converted-space"> </span></span>=<span class="Apple-converted-space"> </span><span class="s1" style="color: rgb(160, 32, 240);">'cluster'</span>;</div>
<div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Courier;" class="">
cfg.neighbours=[];</div>
<div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Courier;" class="">
cfg.parameter=<span class="s1" style="color: rgb(160, 32, 240);">'crsspctrm'</span>;</div>
<div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Courier;" class="">
cfg.alpha<span class="Apple-converted-space">           <span class="Apple-converted-space"> </span></span>= 0.05;</div>
<div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Courier;" class="">
cfg.clusteralpha<span class="Apple-converted-space"> </span><span class="Apple-converted-space">   <span class="Apple-converted-space"> </span></span>= 0.05;</div>
<div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Courier;" class="">
stat=ft_freqstatistics(cfg,freq_coh);</div>
<br class="">
</i></div>
<div style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class="">
<i style="font-size: 12pt; font-variant-ligatures: inherit; font-variant-caps: inherit; font-weight: inherit;" class=""><br class="">
</i></div>
<div style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class="">
<span style="font-family: calibri, arial, helvetica, sans-serif; font-size: 12pt; background-color: rgba(0, 0, 0, 0);" class=""><span style="font-variant-ligatures: inherit; font-variant-caps: inherit;" class="">Where freq_coh is calculated as</span></span></div>
<div style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class="">
<span style="font-size: 12pt; font-variant-ligatures: inherit; font-variant-caps: inherit;" class="">
<div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Courier;" class="">
cfg<span class="Apple-converted-space">           <span class="Apple-converted-space"> </span></span>= [];</div>
<div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Courier;" class="">
cfg.output<span class="Apple-converted-space"> </span><span class="Apple-converted-space">   <span class="Apple-converted-space"> </span></span>=<span class="Apple-converted-space"> </span><span class="s1" style="color: rgb(160, 32, 240);">'powandcsd'</span>;</div>
<div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Courier;" class="">
cfg.method<span class="Apple-converted-space"> </span><span class="Apple-converted-space">   <span class="Apple-converted-space"> </span></span>=<span class="Apple-converted-space"> </span><span class="s1" style="color: rgb(160, 32, 240);">'mtmfft'</span>;</div>
<div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Courier;" class="">
cfg.foilim<span class="Apple-converted-space"> </span><span class="Apple-converted-space">   <span class="Apple-converted-space"> </span></span>= [1 40];</div>
<div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Courier;" class="">
cfg.tapsmofrq<span class="Apple-converted-space"> <span class="Apple-converted-space"> </span></span>= 2;</div>
<div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Courier;" class="">
cfg.pad =<span class="Apple-converted-space"> </span><span class="s1" style="color: rgb(160, 32, 240);">'nextpow2'</span>;</div>
<div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Courier;" class="">
cfg.keeptrials =<span class="Apple-converted-space"> </span><span class="s1" style="color: rgb(160, 32, 240);">'yes'</span>;</div>
<div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Courier;" class="">
freq_coh<span class="Apple-converted-space">         <span class="Apple-converted-space"> </span></span>= ft_freqanalysis(cfg, Coh_data);</div>
<div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Courier;" class="">
<br class="">
</div>
<div style="margin: 0px; font-variant-ligatures: normal; font-variant-caps: normal; font-variant-east-asian: normal; font-variant-position: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Courier;" class="">
<span style="font-family: calibri, arial, helvetica, sans-serif; font-size: 12pt; background-color: rgba(0, 0, 0, 0);" class="">I am getting the following error</span></div>
<div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Courier;" class="">
<br class="">
</div>
<div class="p1" style="font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Courier; margin: 0px;">
Error using ft_statistics_montecarlo (line 250)
<div class="">could not determine the parametric critical value for clustering</div>
<div class=""><br class="">
</div>
<div class="">Error in ft_freqstatistics (line 194)</div>
  [stat, cfg] = statmethod(cfg, dat, design);<br class="">
</div>
<br class="">
</span></div>
<div style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class="">
<span style="font-size: 12pt; font-variant-ligatures: inherit; font-variant-caps: inherit;" class="">Sample data can be found at the following link</span></div>
<div style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class="">
<span style="font-size: 12pt; font-variant-ligatures: inherit; font-variant-caps: inherit;" class=""><a href="https://urldefense.com/v3/__https://www.dropbox.com/s/6gfj97srttteawy/Coh_data.mat?dl=0__;!!HJOPV4FYYWzcc1jazlU!rzdciE12ryfrSpIQp-4LAZj3EK_9U0i1XJby6k79PqsvZKuG4jrCMN-qjHXKDzonA-cj5upg$" id="LPlnk" class="">https://www.dropbox.com/s/6gfj97srttteawy/Coh_data.mat?dl=0</a><br class="">
</span></div>
<div class="_EReadonly_1 _EType_OWALinkPreview _Entity _EId_OWALinkPreview" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;">
<div id="LPBorder_GTaHR0cHM6Ly93d3cuZHJvcGJveC5jb20vcy82Z2ZqOTdzcnR0dGVhd3kvQ29oX2RhdGEubWF0P2RsPTA." class="LPBorder553869" style="width: 800px; margin-top: 16px; margin-bottom: 16px; position: relative; max-width: 800px; min-width: 424px;">
<table id="LPContainer553869" role="presentation" style="padding: 12px 36px 12px 12px; width: 750px; border: 1px solid rgb(200, 200, 200); border-top-left-radius: 2px; border-top-right-radius: 2px; border-bottom-right-radius: 2px; border-bottom-left-radius: 2px;" class="">
<tbody class="">
<tr valign="top" style="border-spacing: 0px;" class="">
<td class="">
<div id="LPImageContainer553869" style="position: relative; margin-right: 12px; height: 160px; overflow: hidden;" class="">
<a target="_blank" id="LPImageAnchor553869" href="https://urldefense.com/v3/__https://www.dropbox.com/s/6gfj97srttteawy/Coh_data.mat?dl=0__;!!HJOPV4FYYWzcc1jazlU!rzdciE12ryfrSpIQp-4LAZj3EK_9U0i1XJby6k79PqsvZKuG4jrCMN-qjHXKDzonA-cj5upg$" class=""><img id="LPThumbnailImageId553869" alt="" height="160" width="160" src="https://www.dropbox.com/static/images/spectrum-icons/generated/content/content-unknown-large.png" style="display: block;" class=""></a></div>
</td>
<td style="width: 568px;" class="">
<div id="LPTitle553869" style="font-size: 21px; font-weight: 300; margin-right: 8px; font-family: wf_segoe-ui_light, "Segoe UI Light", "Segoe WP Light", "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; margin-bottom: 12px;" class="">
<a target="_blank" id="LPUrlAnchor553869" href="https://urldefense.com/v3/__https://www.dropbox.com/s/6gfj97srttteawy/Coh_data.mat?dl=0__;!!HJOPV4FYYWzcc1jazlU!rzdciE12ryfrSpIQp-4LAZj3EK_9U0i1XJby6k79PqsvZKuG4jrCMN-qjHXKDzonA-cj5upg$" style="text-decoration: none; color: var(--themePrimary);" class="">Coh_data.mat</a></div>
<div id="LPDescription553869" style="font-size: 14px; max-height: 100px; color: rgb(102, 102, 102); font-family: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; margin-bottom: 12px; margin-right: 8px; overflow: hidden;" class="">
Shared with Dropbox</div>
<div id="LPMetadata553869" style="font-size: 14px; font-weight: 400; color: rgb(166, 166, 166); font-family: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif;" class="">
<a href="https://urldefense.com/v3/__http://www.dropbox.com__;!!HJOPV4FYYWzcc1jazlU!rzdciE12ryfrSpIQp-4LAZj3EK_9U0i1XJby6k79PqsvZKuG4jrCMN-qjHXKDzonA7PXFKq_$" class="">www.dropbox.com</a></div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<div style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class="">
<span style="font-size: 12pt; font-variant-ligatures: inherit; font-variant-caps: inherit; font-weight: inherit;" class="">any help would be highly appreciated</span></div>
<div style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class="">
<span style="font-size: 12pt; font-variant-ligatures: inherit; font-variant-caps: inherit; font-weight: inherit;" class="">Kind regards</span></div>
<div style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class="">
Bushra Riaz</div>
<span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">_______________________________________________</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">fieldtrip
 mailing list</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" style="font-family: Helvetica; font-size: 14px; 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-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<a href="https://urldefense.com/v3/__https://doi.org/10.1371/journal.pcbi.1002202__;!!HJOPV4FYYWzcc1jazlU!rzdciE12ryfrSpIQp-4LAZj3EK_9U0i1XJby6k79PqsvZKuG4jrCMN-qjHXKDzonA0G39K1J$" style="font-family: Helvetica; font-size: 14px; 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-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">https://urldefense.com/v3/__https://doi.org/10.1371/journal.pcbi.1002202__;!!HJOPV4FYYWzcc1jazlU!rzdciE12ryfrSpIQp-4LAZj3EK_9U0i1XJby6k79PqsvZKuG4jrCMN-qjHXKDzonA0G39K1J$</a><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class=""></span></div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>