Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR MATLAB

how to implement a timer in designer in matlab

% 1) Create a custom property called myTimer, which would look like this:
properties (Access = private)
   myTimer % Description
end

% 2) In your startup function, create your timer object, assign it to the custom property, and configure your timer callback. Something like this:
app.myTimer = timer('Period',2,...
                'ExecutionMode', 'fixedSpacing', ...
                'TasksToExecute', Inf);
app.myTimer.TimerFcn = @(x,y)disp('do something');
Source by www.mathworks.com #
 
PREVIOUS NEXT
Tagged: #implement #timer #designer #matlab
ADD COMMENT
Topic
Name
4+1 =