<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office"><head><!--[if gte mso 9]><xml><o:OfficeDocumentSettings><o:AllowPNG/><o:PixelsPerInch>96</o:PixelsPerInch></o:OfficeDocumentSettings></xml><![endif]--></head><body><div class="ydp99c9848byahoo-style-wrap" style="font-family: Helvetica Neue, Helvetica, Arial, sans-serif; font-size: 13px;">
        <div dir="ltr" data-setdir="false">Hi Helena,</div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false">The warning probably means that the time points you are specifying in cfg.toi do not fully match those present in your data. Try giving a real time interval extracted from your variable time inside stim. <br></div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false">You should get an output of time-frequency bins centered at each toi you specify. However, some time-frequency bins at the edges are missing due to the "boundary effects". I recommend you to check the time frequency tutorial <a href="https://www.fieldtriptoolbox.org/tutorial/timefrequencyanalysis/" rel="nofollow" target="_blank" class="enhancr_card_4387069240">Time-frequency analysis using Hanning window, multitapers and wavelets - FieldTrip toolbox</a></div><div><br></div><div id="ydp29443421enhancr_card_4387069240" class="ydp29443421yahoo-link-enhancr-card ydp29443421ymail-preserve-class ydp29443421ymail-preserve-style" style="max-width:400px;font-family:YahooSans, Helvetica Neue, Segoe UI, Helvetica, Arial, sans-serif" data-url="https://www.fieldtriptoolbox.org/tutorial/timefrequencyanalysis/" data-type="YENHANCER" data-size="MEDIUM" contenteditable="false"><a href="https://www.fieldtriptoolbox.org/tutorial/timefrequencyanalysis/" style="text-decoration-line: none !important; text-decoration-style: solid !important; text-decoration-color: currentcolor !important; color: rgb(0, 0, 0) !important;" class="ydp29443421yahoo-enhancr-cardlink" rel="nofollow" target="_blank"><table class="ydp29443421card-wrapper ydp29443421yahoo-ignore-table" style="max-width:400px" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td width="400"><table class="ydp29443421card ydp29443421yahoo-ignore-table" style="max-width:400px;border-width:1px;border-style:solid;border-color:rgb(224, 228, 233);border-radius:2px" width="100%" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td class="ydp29443421card-primary-image-cell" style="background-color: rgb(0, 0, 0); background-repeat: no-repeat; background-size: cover; position: relative; border-radius: 2px 2px 0px 0px; min-height: 175px;" valign="top" height="175" bgcolor="#000000" background="https://s.yimg.com/lo/api/res/1.2/MiChBzonimJy4xUynnumNA--~A/Zmk9ZmlsbDt3PTQwMDtoPTIwMDthcHBpZD1pZXh0cmFjdA--/https://www.fieldtriptoolbox.org/assets/img/tutorial/timefrequencyanalysis/tfrtiles.png.cf.jpg"><!--[if gte mso 9]><v:rect fill="true" stroke="false" style="width:396px;height:175px;position:absolute;top:0;left:0;"><v:fill type="frame" color="#000000" src="https://s.yimg.com/lo/api/res/1.2/MiChBzonimJy4xUynnumNA--~A/Zmk9ZmlsbDt3PTQwMDtoPTIwMDthcHBpZD1pZXh0cmFjdA--/https://www.fieldtriptoolbox.org/assets/img/tutorial/timefrequencyanalysis/tfrtiles.png.cf.jpg"/></v:rect><![endif]--><table class="ydp29443421card-overlay-container-table ydp29443421yahoo-ignore-table" style="width:100%" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td class="ydp29443421card-overlay-cell" style="background-color: transparent; border-radius: 2px 2px 0px 0px; min-height: 175px;" valign="top" bgcolor="transparent" background="https://s.yimg.com/cv/ae/nq/storm/assets/enhancrV21/1/enhancr_gradient-400x175.png"><!--[if gte mso 9]><v:rect fill="true" stroke="false" style="width:396px;height:175px;position:absolute;top:-18px;left:0;"><v:fill type="pattern" color="#000000" src="https://s.yimg.com/cv/ae/nq/storm/assets/enhancrV21/1/enhancr_gradient-400x175.png"/><v:textbox inset="0,0,20px,0"><![endif]--><table class="ydp29443421yahoo-ignore-table" style="width: 100%; min-height: 175px;" height="175" border="0"><tbody><tr><td class="ydp29443421card-richInfo2" style="text-align:left;padding:15px 0 0 15px;vertical-align:top"></td><td class="ydp29443421card-actions" style="text-align:right;padding:15px 15px 0 0;vertical-align:top"><div class="ydp29443421card-share-container"></div></td></tr></tbody></table><!--[if gte mso 9]></v:textbox></v:rect><![endif]--></td></tr></tbody></table></td></tr><tr><td><table class="ydp29443421card-info ydp29443421yahoo-ignore-table" style="background-color: rgb(255, 255, 255); background-repeat: repeat; background-attachment: scroll; background-image: none; background-size: auto; position: relative; z-index: 2; width: 100%; max-width: 400px; border-radius: 0px 0px 2px 2px; border-top: 1px solid rgb(224, 228, 233);" cellspacing="0" cellpadding="0" border="0" align="center"><tbody><tr><td style="background-color:#ffffff;padding:16px 0 16px 12px;vertical-align:top;border-radius:0 0 0 2px"></td><td style="vertical-align:middle;padding:12px 24px 16px 12px;width:99%;font-family:YahooSans, Helvetica Neue, Segoe UI, Helvetica, Arial, sans-serif;border-radius:0 0 2px 0"><h2 class="ydp29443421card-title" style="font-size: 14px; line-height: 19px; margin: 0px 0px 6px; font-family: YahooSans, Helvetica Neue, Segoe UI, Helvetica, Arial, sans-serif; color: rgb(38, 40, 42); max-width: 314px;">Time-frequency analysis using Hanning window, multitapers and wavelets -...</h2><p class="ydp29443421card-description" style="font-size: 12px; line-height: 16px; margin: 0px; color: rgb(151, 155, 167);"></p></td></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table></a></div></div><div class="ydp99c9848byahoo-style-wrap" style="font-family: Helvetica Neue, Helvetica, Arial, sans-serif; font-size: 13px;"><div dir="ltr" data-setdir="false">Best wishes,</div><div dir="ltr" data-setdir="false">Maite<br></div><div><br></div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false"><br></div></div><div id="yahoo_quoted_4271329758" class="yahoo_quoted">
            <div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
                
                <div>
                    En viernes, 23 de octubre de 2020 9:31:25 GMT+1, Helena Pereira <hri.pereira@campus.fct.unl.pt> escribió:
                </div>
                <div><br></div>
                <div><br></div>
                <div><div id="yiv7751115327"><div dir="ltr"><div>Dear FieldTrip community, <br></div><div><br></div><div>I am a beginner using fieldtrip, so I know I am missing something in this domain:<br></div><div>I am making a time-frequency analysis of EEG data with wavelets. However, I am getting the following warning:<br></div><div><i><br></i></div><div><i>Warning: output time-bins artrial 30, frequency 4 (7.00 Hz)</i></div><div><i>Warning: output time-bins are different from input time-bins</i></div><div><i><br></i></div><div>Using this parameters:</div><div><span style="font-family:monospace;">    % Wavelet power<br>    cfg = []<br>    cfg.output = 'pow';<br>    cfg.channel = [1:64];<br>    cfg.keeptrials='no';<br>    cfg.method = 'wavelet';<br>    cfg.width = 7;<br>    cfg.toi = -2.0:0.01:2.0;<br>    cfg.foi = 4:1:20;</span></div><div><span style="font-family:monospace;"><br></span></div><div><span style="font-family:monospace;">    p_stim = ft_freqanalysis(cfg,stim);</span></div><div><br></div><div>I can mitigate the warning by changing the cfg.toi from <span style="font-family:monospace;">[ -2.0:0.01:2.0] <span style="font-family:arial, sans-serif;">to
  </span>[ -2.0:0.5:2.0] 

</span></div><div><br></div><div>However, the plot of the spectrum changes a lot, as I expected as the time window changes from intervals from 0.01 to 0.5:</div><div>With the warning:</div><div><div><div><img src="cid:2v1O2vd87hDAekRjy8pD" yahoo_partid="1.3" alt="imagem.png" width="492" height="281"><br></div></div></div><div><br></div><div>Without the warning:</div><div><br></div><div>
<img src="cid:EOcbwz5bn19qL869U0Ke" alt="imagem.png" width="492" height="271">

</div><div><br></div><div><br></div><div>I know I am missing something regarding signal analysis... Why the differences in the changing the step of the interval leads to the warning?<br></div><div><br></div><div>Can you help me? I am not sure if the warning can influence the final results. <br></div><div><br></div><div>Best regards, <br></div><div>Helena Pereira<br></div><div><br></div><div><i></i></div></div></div>_______________________________________________<br>fieldtrip mailing list<br><a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br><a href="https://doi.org/10.1371/journal.pcbi.1002202" target="_blank">https://doi.org/10.1371/journal.pcbi.1002202</a><br></div>
            </div>
        </div></body></html>