Main Content

Analyze System Object Code

View and navigate System object™ code using the Analyzer.

The Analyzer displays an outline of all elements in the System object code.

  • Navigate to a specific input, output, property, state, or method by clicking the name of that element.

  • Expand or collapse element sections with the arrow buttons.

  • Identify access levels for properties and custom methods with the + (public), # (protected), and – (private) symbols.

For example:

  1. Open an existing System object.

  2. In the MATLAB® toolstrip, in the System Object section, click Inspect.

  3. In the Analyzer dialog box that opens, click the resetImpl method.

    Analyzer contents

    The cursor in the MATLAB Editor window goes to the resetImpl method.

    resetImpl method

The Analyzer provides warnings for legacy base classes, properties with legacy attributes, and redundant methods. When a System object contains legacy code, the Analyzer displays an Update button that helps you replace or remove the legacy code.

Analyzer dialog box contents with obsolete matlab.system.mixin.CustomIcon class

The warnings and Update button are not available in MATLAB Online.

When you click Update, the Analyzer:

  • Converts legacy System object attributes, such as Stringsets, Logical, and PositiveInteger

  • Deletes obsolete System object mixin superclasses, such as matlab.system.mixin.SampleTime, matlab.system.mixin.Nondirect, and matlab.system.mixin.Propagates

  • Deletes obsolete authoring methods, such as processInputSizeChangeImpl(obj,u,...)

  • Deletes redundant authoring methods, such as isInputDataTypeMutableImpl, isInputSizeMutableImpl, isInputComplexityMutableImpl, isDiscreteStateSpecificationMutableImpl, and isTunablePropertyDataTypeMutableImpl when both of these conditions are met:

    • The System object defines or inherits StrictDefaults.

    • The parent class of the System object does not define these authoring methods.

When the update modifies the System object code, a prompt lets you compare the updated code with the previous version.

See Also

Related Topics