Code covered by the BSD License  

Highlights from
CO2gui - lab control and automation

CO2gui - lab control and automation

by

 

06 Jan 2010 (Updated )

Software used for controlling and data logging lab equipment.

stopvartimer(varTimer)
function stopvartimer(varTimer)
% STOPVARTIMER stops the timers generated using vartimer

% error checking
if ~isa(varTimer, 'timer') && isvalid(varTimer)
    % input must be a timer
    error('The input to var timer must be a timer.')
end

% gets the user data
userData = {varTimer.UserTimer};

% saves it back into user data
for m = 1:length(varTimer)
    % sets the ticker(s) to -1
    userData(m).ticker = -1;
    
    % saves the right user data
    varTimer(m).userData = userData{m};
end

% stops the timer(s)
stop(varTimer)

Contact us