www.gusucode.com > matlab 案例源码 matlab代码程序 > matlab/SetTimerObjectPropertiesUsingStructureExample.m
%% Set Timer Object Properties Using Structure % Construct a structure to modify several timer object properties. % Copyright 2015 The MathWorks, Inc. s.BusyMode = 'queue'; s.ExecutionMode = 'fixedDelay'; s.ObjectVisibility = 'off' %% % Create a timer, display the properties in |s|, modify the timer, display % the new values of the properties, and delete the timer. t = timer; get(t,{'BusyMode','ExecutionMode','ObjectVisibility'}) set(t,s) get(t,{'BusyMode','ExecutionMode','ObjectVisibility'}) delete(t)