I want to throw an error when timer fires up .
try timeout = timer('TimerFcn','error(''TIMEOUT OCCURED'');','StartDelay',0.01); start(timeout); '''Some Code''' stop(timeout); delete(timeout);catch ME delete(timeout); disp('Error is caught') ''' Do something else '''end
Upon executing, I am getting
Error while evaluating TimerFcn for timer 'timer-47'
Best Answer