Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

isInactivePropertyImpl

Class: matlab.System
Package: matlab

Inactive property status

Syntax

flag = isInactivePropertyImpl(obj,prop)

Description

flag = isInactivePropertyImpl(obj,prop) specifies whether a public, non-state property is inactive and not visible for the current object configuration. An inactive property is a property that is not relevant to the object, given the values of other properties. Inactive properties are not shown if you use the disp method to display object properties. If you attempt to use public access to directly access or use get or set on an inactive property, a warning occurs.

isInactiveProperty is called by the disp method and by the get and set methods.

    Note:   You must set Access = protected for this method.

Input Arguments

obj

System object™ handle

prop

Public, non-state property name

Output Arguments

flag

Inactive status Indicator of the input property prop for the current object configuration, returned as a logical scalar value

Examples

expand all

Display the InitialValue property only when the UseRandomInitialValue property value is false.

methods (Access = protected)
  function flag = isInactivePropertyImpl(obj,propertyName)
    if strcmp(propertyName,'InitialValue')
      flag = obj.UseRandomInitialValue;
    else
      flag = false;
    end
  end
end
Was this topic helpful?