G - since the timer callback (that function that you wish to execute every sixty seconds) is a function, then you need to assign a function handle rather than a string giving the name of the file that you wish to execute. Perhaps this is different for your version of MATLAB, but for mine (R2014a), I would do the following
set(ceas, 'TimerFcn', @refresh, 'Period', 60)
where, in my refresh.h file I would have
function refresh(source, eventdata)
fromdate = now-1;
todate = now;
For all timer callbacks, there are two default input parameters, source and eventdata, so you need to define them as inputs to the function.
In the above, I've commented out the call to timeseries because it is unclear what c and sec are (or why you are passing a cell array into timeseries). What is the intent here? Where are these variables (c and sec) coming from?
Best Answer