<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:"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";
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;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";
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;}
--></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-US" style="font-size:12.0pt;font-family:"Times New Roman","serif"">Dear FieldTrip users,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt;font-family:"Times New Roman","serif"">I have a question regarding the function
<b><i>ft_freqstatistics</i></b>. <br>
<br>
I would like to do statistics on the powerspectrum data (output of the function <b>
<i>ft_freqanalysis</i></b>) between two conditions (same monkey). <br>
<br>
I have the Data Input whose structure corresponds to the output of the function <i>
ft_freqanalysis</i>, and the design matrix whose size is the same as the data input (datainput.powspctrm) : size(datainput.powspctrm) = size(cfg.design), and the data to compare are in datainput.powspctrm.
<br>
<br>
BigMat = NaN(8670,1,182,164);<br>
BigMat (1:2078,1,1:91,1:77) = MM25; <span style="color:#00B050">% matrix (trials, channel, freq, time) – 1st condition<br>
</span>BigMat (2079:8670,1,92:182,78:164) = M25; <span style="color:#00B050">% matrix (trials, channel, freq, time) – 2nd condition<br>
</span><br>
BigMatdef = PowAllCond_ALLFBS{1,1}; <span style="color:#00B050">% PowAllCond_ALLFBS{1,1} : output function ft_freqanalysis, so to get the same structure</span><br>
BigMatdef.powspctrm = BigMat; <span style="color:#00B050">% big matrix (trials, channel,freq,time) – with the two conditions</span><br>
<br>
cfg.design(1:2078,:,:,:) = 1; <span style="color:#00B050">% 1st condition</span><br>
cfg.design(2079:8670,:,:,:) = 2; <span style="color:#00B050">% 2nd condition<br>
</span><br>
However I still have this error message from Matlab: <br>
"<span style="color:red">Error using ft_freqstatistics (line 294)<br>
the number of observations in the design does not match the number of observations in the data</span>"<br>
<br>
Any tip/suggestion? <br>
<br>
Many thanks in advance!<br>
<br>
Best,<br>
Laetitia.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt;font-family:"Times New Roman","serif";mso-fareast-language:DE">Dr. Laetitia Chauvière - PhD<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt;font-family:"Times New Roman","serif";mso-fareast-language:DE">Post-Doc - Prof. Singer's lab - Room 303<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt;font-family:"Times New Roman","serif";mso-fareast-language:DE">Max Planck Institute for Brain Research<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman","serif";mso-fareast-language:DE">Deutschordenstr. 46<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman","serif";mso-fareast-language:DE">60528 Frankfurt am Main - Germany<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman","serif";mso-fareast-language:DE">laetitia.chauviere@brain.mpg.de<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt;font-family:"Times New Roman","serif";mso-fareast-language:DE">T: +49 69 96769-272</span><span lang="EN-US" style="font-size:12.0pt;font-family:"Times New Roman","serif";mso-fareast-language:DE"><o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>