<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 15 (filtered medium)"><!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><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;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
{font-family:Verdana;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman",serif;
color:black;}
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;}
p
{mso-style-priority:99;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:12.0pt;
font-family:"Times New Roman",serif;
color:black;}
pre
{mso-style-priority:99;
mso-style-link:"HTML Preformatted Char";
margin:0in;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";
color:black;}
tt
{mso-style-priority:99;
font-family:"Courier New";}
span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-priority:99;
mso-style-link:"HTML Preformatted";
font-family:Consolas;
color:black;}
span.EmailStyle21
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
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 bgcolor=white lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Hi Benedikt and Hweeling,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>note that the rounding step is not necessary, because FieldTrip will round to steps according to your frequency resolution. Actual frequencies of interest (foi) are subject to the time window of your trials defining the Raleigh frequency (i.e. frequency resolution). With trials of 2s you have a frequency resolution of 0.5 Hz, so you can only get estimates at 4 Hz, 4.5 Hz, 5 Hz etc. With the code you sent around, you request frequency at<o:p></o:p></span></p><p class=MsoNormal><b><span style='font-size:9.0pt;font-family:"Verdana",sans-serif;color:#626264;mso-fareast-language:NL'><o:p> </o:p></span></b></p><p class=MsoNormal><b><span style='font-size:9.0pt;font-family:"Verdana",sans-serif;color:#626264;mso-fareast-language:NL'>4.0000 4.7568 5.6568 6.7271<o:p></o:p></span></b></p><p class=MsoNormal><b><span style='font-size:9.0pt;font-family:"Verdana",sans-serif;color:#626264;mso-fareast-language:NL'><o:p> </o:p></span></b></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>will thus effectively 4, 5, 6 and 7 Hz will be computed (due to the rounding to the next step of the 0.5 Hz resolution). <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>I do not know the length of your trials, but I thought I drop this here to avoid future questions on ‘why this didn’t work as expected’ ;)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Best,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Jörn<o:p></o:p></span></p><div><p class=MsoNormal><b><span style='font-size:9.0pt;font-family:"Verdana",sans-serif;color:#255A9E;mso-fareast-language:NL'><o:p> </o:p></span></b></p><p class=MsoNormal><b><span style='font-size:9.0pt;font-family:"Verdana",sans-serif;color:#255A9E;mso-fareast-language:NL'>Jörn M. Horschig</span></b><span style='font-size:9.0pt;font-family:"Verdana",sans-serif;color:#626264;mso-fareast-language:NL'>, Software Engineer</span><b><span style='font-size:9.0pt;font-family:"Verdana",sans-serif;mso-fareast-language:NL'><o:p></o:p></span></b></p><p class=MsoNormal><a href="http://www.artinis.com/"><span style='font-size:9.0pt;font-family:"Verdana",sans-serif;color:#626264;mso-fareast-language:NL'>Artinis Medical Systems</span></a><span style='font-size:9.0pt;font-family:"Verdana",sans-serif;color:#626264;mso-fareast-language:NL'> | +31 481 350 980 </span><b><span style='font-size:9.0pt;font-family:"Verdana",sans-serif;color:#255A9E;mso-fareast-language:NL'><o:p></o:p></span></b></p></div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><div style='border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt'><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext'>From:</span></b><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext'> fieldtrip-bounces@science.ru.nl [mailto:fieldtrip-bounces@science.ru.nl] <b>On Behalf Of </b>Benedikt Ehinger<br><b>Sent:</b> Monday, February 2, 2015 10:13 AM<br><b>To:</b> fieldtrip@science.ru.nl<br><b>Subject:</b> Re: [FieldTrip] basic question<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Dear Hweeling,<br>we use the following code:<o:p></o:p></p><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal><tt><span style='font-size:10.0pt'> % Make 23 logarithmical spaced .25-octave frequencies</span></tt><br><tt><span style='font-size:10.0pt'> cfg.foi = logspace(log10(4),log10(181),23);</span></tt><br><tt><span style='font-size:10.0pt'> cfg.foi = round(cfg.foi.*100)./100; % optional rounding to get nice round 4,8,16...64Hz </span></tt><br><tt><span style='font-size:10.0pt'> % The windows should have 3/4 octave smoothing in frequency domain</span></tt><br><tt><span style='font-size:10.0pt'> cfg.tapsmofrq = (cfg.foi*2^((3/4)/2) - cfg.foi*2^((-3/4)/2)) /2; % /2 because fieldtrip takes +- tapsmofrq</span></tt> <br><tt><span style='font-size:10.0pt'> </span></tt><br><tt><span style='font-size:10.0pt'> % The timewindow should be so, that for freqs below 16, it results in n=1</span></tt><br><tt><span style='font-size:10.0pt'> % Taper used, but for frequencies higher, it should be a constant 250ms.</span></tt><br><tt><span style='font-size:10.0pt'> % To get the number of tapers we use: round(cfg.tapsmofrq*2.*cfg.t_ftimwin-1)</span></tt><br><tt><span style='font-size:10.0pt'> cfg.t_ftimwin = [2./(cfg.tapsmofrq(cfg.foi<16)*2),repmat(0.25,1,length(cfg.foi(cfg.foi>=16)))];</span></tt><o:p></o:p></p></blockquote><p class=MsoNormal style='margin-bottom:12.0pt'><br>I guess the first line is the answer to your question.<br>I hope this bit of code helps.<br>Best,<br>Benedikt<o:p></o:p></p><div><p class=MsoNormal>Am 02.02.2015 um 09:24 schrieb Hwee Ling Lee:<o:p></o:p></p></div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><div><div><div><div><p class=MsoNormal>Dear all,<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>I've got a basic question regarding spectral analysis.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>In Hipp's neuron paper, it was mentioned that "spectral estimates were computed across 23 logarithmically scaled frequencies from 4 - 181 Hz (0.25 octave steps)". May I know how can one implement this using Fieldtrip?<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Thanks.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Best regards,<o:p></o:p></p></div><div><p class=MsoNormal>Hweeling<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div></div></div></div><p class=MsoNormal><br><br><br><o:p></o:p></p><pre>_______________________________________________<o:p></o:p></pre><pre>fieldtrip mailing list<o:p></o:p></pre><pre><a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><o:p></o:p></pre><pre><a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><o:p></o:p></pre></blockquote><p class=MsoNormal style='margin-bottom:12.0pt'><br><br><o:p></o:p></p><div class=MsoNormal align=center style='text-align:center'><hr size=1 width="99%" noshade style='color:#909090' align=center></div><table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 style='border-collapse:collapse'><tr><td style='padding:0in 11.25pt 0in 6.0pt'><p class=MsoNormal><a href="http://www.avast.com/"><span style='text-decoration:none'><img border=0 width=90 height=33 id="_x0000_i1026" src="http://static.avast.com/emails/avast-mail-stamp.png" alt="http://static.avast.com/emails/avast-mail-stamp.png"></span></a><o:p></o:p></p></td><td style='padding:.75pt .75pt .75pt .75pt'><p><span style='font-family:"Calibri",sans-serif;color:#3D4D5A'>Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft. <br></span><a href="http://www.avast.com/"><span style='font-family:"Calibri",sans-serif'>www.avast.com</span></a><span style='font-family:"Calibri",sans-serif;color:#3D4D5A'> <o:p></o:p></span></p></td></tr></table><p class=MsoNormal><o:p> </o:p></p></div></div></body></html>