FUNCTION REFERENCE

isvalid

True for a handle object that has not been deleted.

True for a handle object that has not been deleted.

Syntax

tf = isvalid(h)

For an object of a handle class (classdef Name < handle) it is false after delete(h), for every copy of the object. containers.Map and inputParser objects answer the same way.

Example

m = containers.Map; isvalid(m)   % true

Differences from MATLAB: Only scalar objects; a value-class object errors "Undefined function 'isvalid' for input arguments of type 'Name'.".

These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.