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.

validatePropertiesImpl

Class: matlab.System
Package: matlab

Validate property values

Syntax

validatePropertiesImpl(obj)

Description

validatePropertiesImpl(obj) validates interdependent or interrelated property values the first time the System object™ runs.

validatePropertiesImpl is the first method called by the setup method. validatePropertiesImpl also is called before the processTunedPropertiesImpl method.

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

    You cannot modify any properties in this method. Use the processTunedPropertiesImpl method or setupImpl method to modify properties.

Tips

To check if a property has changed since stepImpl was last called, use isChangedProperty(obj,property) within validatePropertiesImpl.

Input Arguments

obj

System object handle

Examples

expand all

Validate that the useIncrement property is true and that the value of the increment property is greater than zero.

methods (Access = protected)
   function validatePropertiesImpl(obj)
      if obj.useIncrement && obj.increment < 0
         error('The increment value must be positive');
      end
    end
end
Was this topic helpful?