<div dir="ltr">Hi,<div><br></div><div>I'm having a bit of difficulty fully understanding the use of 'frames' and 'epochlim' in newtimef.</div><div><br></div><div>My assumption is that frames should always equal length([epochlim(1):1000/srate:epochlim(2)])</div>

<div>I haven't looked through the newtimef code, but I assume this would be necessary to properly define the location of the zero time (time locking event) within the epoch.</div><div><br></div><div>If my assumption is correct, I have two main points of confusion.</div>

<div><br></div><div>1. The documentation states that 'frames' is ignored for 2D and 3D data (I assume because frames should now be defined by the dimensions of the array). However, this does not seem to be the case. The following two segments of code (differing only in the frames parameter) produce different output frequency bins, even though they both use 2D data with the same dimensions.</div>

<div><br></div><div>cycles = 0; currsig = rand(2001,5); frames = 2001; epochlim = [-1000 1000]; srate = 1000; </div><div>[ersp,itc,powbase,times,freqs]= newtimef(currsig,frames,epochlim,srate,cycles);  <br></div><div><div>

<br></div><div><div>cycles = 0; currsig = rand(2001,5); frames = 501; epochlim = [-1000 1000]; srate = 1000; </div><div>[ersp,itc,powbase,times,freqs]= newtimef(currsig,frames,epochlim,srate,cycles); </div></div><div><br>

</div></div><div><br></div><div>2. If I specify an epochlim that has a time range smaller than the epoch, newtimef still runs without producing an error. But in this case, how does it know where the time locking event is within the epoch?</div>

<div><br></div><div>cycles = 0; currsig = rand(2001,5); frames = 2000; epochlim = [-500 500]; srate = 1000;  </div><div>[ersp,itc,powbase,times,freqs]= newtimef(currsig,frames,epochlim,srate,cycles); </div><div><br></div>

<div>Can anyone clarify these issues for me?</div><div><br></div><div>Thanks</div><div><br></div><div>Omar</div></div>