i need to set timer 20 sec with word (Rest) and 10 sec (working) and all time is 10 minutes

4 comentarios

Jan
Jan el 7 de Sept. de 2021
Editada: Jan el 7 de Sept. de 2021
The question is not clear yet. Please post what you have tried so far and ask a specific question.
hayder al-omairi
hayder al-omairi el 8 de Sept. de 2021
I have an experiment and I need to stimulat the subject (ask the subject to make task (hand tapping) 10 second and stop tapping (rest) 20 second ) spontenuosly and repeat this stimulas 20 times ( 20 second + 10 second ) X 20 and show the task on screen " Hand tapping " / " Rest " within this task I need to record the brain signal
Jan
Jan el 8 de Sept. de 2021
So it is sometimes tapping for 10 seconds and sometimes for 20 seconds?

Iniciar sesión para comentar.

 Respuesta aceptada

Walter Roberson
Walter Roberson el 9 de Sept. de 2021

1 voto

For these kinds of work I recommend using Psychtoolbox http://psychtoolbox.org/ as it is designed specifically for presenting stimuli for precise times.

Más respuestas (1)

Jan
Jan el 8 de Sept. de 2021

0 votos

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 comentarios

hayder al-omairi
hayder al-omairi el 9 de Sept. de 2021
thanks @Jan exactly what I want to do but "Tap" / ''Rest " in full schreen, is it possible ?
Jan
Jan el 9 de Sept. de 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.

Iniciar sesión para comentar.

Categorías

Etiquetas

Preguntada:

el 7 de Sept. de 2021

Comentada:

el 17 de Sept. de 2021

Community Treasure Hunt

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

Start Hunting!

Translated by