<html 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=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 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;}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style></head><body lang=EN-CA><div class=WordSection1><p class=MsoNormal>Hello everyone, </p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I am running into an error when I try to compute the cluster based permutation test in the frequency-time domain comparing baseline to when the stimulus is present. I’ve calculated the power for 300 milliseconds (1 millisecond is equal to one time point) before the onset of the stimulus and 300ms during the stimulus for a range of 10 frequencies. The error I’m running into is stated below as well as my code and I’ve attached an image of what the data looks like. I’ve tried following the tutorials and searching through the mailing list and can’t seem to find a solution. Has anyone else run into this problem and found a solution or am I making an error somewhere in my analysis?</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>MY CODE:</p><p class=MsoNormal> cfg = [];</p><p class=MsoNormal> cfg.channel = 'CZ';</p><p class=MsoNormal> cfg.latency = [0.1 0.4];</p><p class=MsoNormal> cfg.method = 'montecarlo';</p><p class=MsoNormal> cfg.frequency = 'all';</p><p class=MsoNormal> cfg.statistic = 'ft_statfun_actvsblT';</p><p class=MsoNormal> cfg.correctm = 'cluster';</p><p class=MsoNormal> cfg.clusteralpha = 0.05;</p><p class=MsoNormal> cfg.clusterstatistic = 'maxsum';</p><p class=MsoNormal> cfg.tail = 0;</p><p class=MsoNormal> cfg.clustertail = 0;</p><p class=MsoNormal> cfg.alpha = 0.025;</p><p class=MsoNormal> cfg.numrandomization = 500;</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal> ntrials = size(TFR_FFR.powspctrm,1);</p><p class=MsoNormal> design = zeros(2,2*ntrials);</p><p class=MsoNormal> design(1,1:ntrials) = 1;</p><p class=MsoNormal> design(1,ntrials+1:2*ntrials) = 2;</p><p class=MsoNormal> design(2,1:ntrials) = [1:ntrials];</p><p class=MsoNormal> design(2,ntrials+1:2*ntrials) = [1:ntrials];</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal> cfg.design = design;</p><p class=MsoNormal> cfg.ivar = 1;</p><p class=MsoNormal> cfg.uvar = 2;</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal> TFR_FFR_stat = ft_freqstatistics(cfg, TFR_FFR, TFR_FFRbaseline);</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>THE ERROR MESSAGE: </p><p class=MsoNormal>“Error using reshape</p><p class=MsoNormal>To RESHAPE the number of elements must not change.</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Error in ft_statfun_actvsblT (line 115)</p><p class=MsoNormal> timeavgdat=repmat(reshape(meanreshapeddat,(nchan*nfreq),nrepl),ntime,1);</p><p class=MsoNormal> </p><p class=MsoNormal>Error in ft_statistics_montecarlo (line 267)</p><p class=MsoNormal> [statobs, cfg] = statfun(cfg, dat, design);</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Error in ft_freqstatistics (line 194)</p><p class=MsoNormal> [stat, cfg] = statmethod(cfg, dat, design);</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Error in TFRClusterBasedStats (line 54)</p><p class=MsoNormal> TFR_FFR_stat = ft_freqstatistics(cfg, TFR_FFR,</p><p class=MsoNormal> TFR_FFRbaseline);”</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Thank you, </p><p class=MsoNormal>David Prete<br>Ph.D. Candidate <br>McMaster Institute for Music and the Mind<br>Department Psychology, Neuroscience and Behaviour <br>McMaster University </p><p class=MsoNormal><o:p> </o:p></p></div></body></html>