isvalid
Class: handle
Determine valid handles
Syntax
B = isvalid(H)
Description
returns a logical array in which each element is B = isvalid(H)true if the corresponding element in H is a valid handle. A handle variable becomes invalid if the object has been deleted. Within a class delete method, isvalid always returns false.
You cannot override the isvalid method in handle subclasses.
Input Arguments
Output Arguments
Examples
Test for Valid Handles
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