timer with text and sound ?

4 vues (au cours des 30 derniers jours)
hayder al-omairi
hayder al-omairi le 7 Sep 2021
i need to set timer 20 sec with word (Rest) and 10 sec (working) and all time is 10 minutes
  4 commentaires
hayder al-omairi
hayder al-omairi le 8 Sep 2021
Jan
Jan le 8 Sep 2021
So it is sometimes tapping for 10 seconds and sometimes for 20 seconds?

Connectez-vous pour commenter.

Réponse acceptée

Walter Roberson
Walter Roberson le 9 Sep 2021
For these kinds of work I recommend using Psychtoolbox http://psychtoolbox.org/ as it is designed specifically for presenting stimuli for precise times.
  1 commentaire
hayder al-omairi
hayder al-omairi le 17 Sep 2021
thanks I have use it it's working well

Connectez-vous pour commenter.

Plus de réponses (1)

Jan
Jan le 8 Sep 2021
pause(60);
for k = 1:20
disp('Tap');
pause(10)
disp('Rest');
pause(20);
end
The sleep command of java has a smaller jitter than the pause command:
% replace pause(duration) by:
java.lang.Thread.sleep(duration * 1000);
  2 commentaires
hayder al-omairi
hayder al-omairi le 9 Sep 2021
thanks @Jan exactly what I want to do but "Tap" / ''Rest " in full schreen, is it possible ?
Jan
Jan le 9 Sep 2021
What exactly does "Tap in full screen" mean? "Full screen" can mean a Matlab figure with visible borders and menu bar, or without the borders, with or without the taskbar of the operating system.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Timing and presenting 2D and 3D stimuli dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by