Skip to Main Content Skip to Search
Product Documentation

isvalid (timer) - Determine whether timer object is valid

Syntax

out = isvalid(obj)

Description

out = isvalid(obj) returns a logical array, out, that contains a 0 where the elements of obj are invalid timer objects and a 1 where the elements of obj are valid timer objects.

An invalid timer object is an object that has been deleted and cannot be reused. Use the clear command to remove an invalid timer object from the workspace.

Examples

Create a valid timer object.

t = timer;
out = isvalid(t)
out =

    1

Delete the timer object, making it invalid.

delete(t)
out1 = isvalid(t)
out1 =

    0

See Also

delete(timer) | timer

  


Free MATLAB Interactive Kit

Explore how to use MATLAB to make advancements in engineering and science.


Download free kit

Trials Available

Try the latest version of MATLAB and other MathWorks products.


Get trial software
 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS