Global frame counter and accurate timing programming

조회 수: 2 (최근 30일)
Yu Takahashi
Yu Takahashi 2021년 2월 15일
댓글: Yu Takahashi 2021년 2월 18일
Dear members
I am currently programming for a very timing-snsitive experiment. I was wondering whether there is a way to setup a global frame counter, which starts upon the program initiated, keeps counting till the program terminated, so that I could check and specify different actions(e.g., present images or text) accourding to the specific frames reached. In other words I am looking for a tic toc timer or internal cpu clock alternative(e.g., using the function GetSecs).
The reason behind trying to sdopt this rather cumbersome method is due to the fact that according to the Accurate timimg demo it seemed better to count the number of frames rather than specify the duration of each event. At the same time, a potential concern for using this frame counting strategy is I am not sure whether dropping frames (perhaps due to hardware limitations) would messed up the sequences entirely. For example, using a 240Hz display dropping 1 frame would advance the entire sequence forward by 1/240 second, as more frames were dropped the effect would accmulate resulting further timing deviations? I am pretty new with this type of programming, perhaps this is a misunderstanding?
Any comments or suggestions would be great! Thanks in advance!
p.s. I am using psychtoolbox for better timing accuracy
  댓글 수: 8
Walter Roberson
Walter Roberson 2021년 2월 17일
There is very slim hope of doing any of this with regular MATLAB; you would either need psychtoolbox facilities or build your own that are similar to psychtoolbox. Psychtoolbox already works are to ensure that screen flips are in synch with monitor refreshes.
Yu Takahashi
Yu Takahashi 2021년 2월 18일
@Walter Roberson Thanks! I think I might try to contact someone from the dev team.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Timing and presenting 2D and 3D stimuli에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by