- Debug code invoked by timer
- Can't find where the warning msg is from
- http://se.mathworks.com/matlabcentral/answers/1427-what-frustrates-you-about-matlab#answer_76813
finding the source of an error in a timer code
7 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
AA
am 24 Feb. 2015
Bearbeitet: per isakson
am 24 Feb. 2015
T = timer('Period',400,... %period
'ExecutionMode','fixedRate',... %{singleShot,fixedRate,fixedSpacing,fixedDelay}
'BusyMode','drop',... %{drop, error, queue}
'TasksToExecute',inf,...
'StartDelay',0,...
'TimerFcn',@(~,~)Untitled(q,a,norbert),...
'StartFcn',[],...
'StopFcn',[],...
'ErrorFcn',[]);
start(T);
Error while evaluating TimerFcn for timer 'timer-1'
Invoke Error, Dispatch Exception: Source: Microsoft Excel Description: Open method of Workbooks class failed Help File: xlmain11.chm Help Context ID: 0
I get the above error from time to time with the above matlab code. I dont know how to eliminate this source of error. Can anyone give me a suggestion? I tried the try catch method but it doesnt help.
thanks
0 Kommentare
Akzeptierte Antwort
per isakson
am 24 Feb. 2015
Bearbeitet: per isakson
am 24 Feb. 2015
See
"I tried the try catch method but it doesn't help."   How did you use try-catch-end? I find the following "wrapper" useful
function called_by_timer(.)
try
the_real_function(.)
catch me
disp( getReport( me, 'extended', 'hyperlinks', 'on' ) )
end
end
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Startup and Shutdown finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!