www.gusucode.com > matlab 案例源码 matlab代码程序 > matlab/DeleteMultipleTimersUsingtimerfindExample.m
%% Delete Multiple Timers Using timerfind % Use |delete| with the |timerfind| method to remove all visible timers % from memory. This is an alternative to deleting individual timers by variable % name. % Copyright 2015 The MathWorks, Inc. %% % Create and start three timers that compute the sine, cosine and tangent % of |pi/4|. t1 = timer('TimerFcn','sin(pi/4);'); t2 = timer('TimerFcn','cos(pi/4);'); t3 = timer('TimerFcn','tan(pi/4);'); %% % Delete the timers from memory using |timerfind|. This removes all visible % timer objects from memory. delete(timerfind)