MATLAB: Can you make matlab do a beep every 5 seconds

beepchronometerclocksoundsoundstimetimer

I'm making a chronometer on Matlab and i'd like it to beep every 5 seconds so the user knew that 5 seconds have passed.. Is there a way to make it ? Thanks !

Best Answer

This is a job for the timer:
TimerH = timer('Period', 5, 'ExecutionMode', 'fixedRate', ...
'Callback', @TimerCallback);
start(TimerH);
function TimerCallback(TimerH, EventData)
beep;
Related Question