FUNCTION REFERENCE

isprop

True if a name is a property of an object.

True if a name is a property of an object.

Syntax

tf = isprop(obj, name)

For an object of a classdef class (or the name of its class file) it is true for every property the class defines, whatever its access, Constant ones included, as GNU Octave answers. For a graphics handle it checks the documented properties of the handle's class (Line, Axes, Figure, ...) without regard to case, as get and set do; an array of handles gives one logical per handle. For MException and the other struct-backed language objects it checks their public properties.

Example

isprop(MException('a:b', 'c'), 'message')   % true

Example

h = plot(1:3); isprop(h, 'LineWidth')   % true

Differences from MATLAB: Other values (numbers, structs, cells, text that names no class file) report "isprop: this call form is not supported yet" where MATLAB answers false. Only scalar classdef objects.

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