I am trying to execute the following 3 lines of script every minute. For this, i am using the timer function but it seems that the 3 lines that i need are not executed properly.
refresh1.m (the 3 lines that i want to execute every X seconds)
fromdate = now-1;todate = now;timeseries(c,sec,{fromdate,todate},60);
timer function:
time= datestr(now)ceas = timerset(ceas,'executionMode','fixedRate')get(ceas)set(ceas, 'TimerFcn', 'refresh.m', 'Period', 5) %run the timer every X seconds and execute the --disp(rand)--
get(ceas)startat(ceas, '04:04:00')
Any idea how to do it? thank you in advance
Best Answer