Determine valid handles
B = isvalid(H)
a logical array in which each element is
B = isvalid(
true if the corresponding
H is a valid handle. A handle variable becomes invalid if
the object has been deleted. Within a class
isvalid always returns
You cannot override the
isvalid method in
H— Input array
Input array, specified as an array of object handles.
B— Result of validity test
Result of validity test, returned as a logical array the same
H in which each element is
the corresponding element in
H is a valid handle.
To learn about attributes of methods, see Method Attributes.
This example tests a handle array for valid members:
H = plot(rand(5)); delete(H(3:4)) B = isvalid(H)
B = 1 1 0 0 1