I have a function called watch which accepts clock() as input. I would like this function to run every second, so I created a timer sec to call that function
function watch(time)disp(time)endsec = timer;set(sec,'ExecutionMode','fixedRate','TimerFcn',{@watch,clock()});start(sec)
But the code produces the following error:
Error while evaluating TimerFcn for timer 'timer-14' Too many input arguments.
What is the correct way of calling the watch function? Using R2017b
Thanks.
Best Answer