Main Content

getDiscreteStateSpecificationImpl

Discrete state size, data type, and complexity

Syntax

[size,dataType,complexity] = getDiscreteStateSpecificationImpl(obj,propertyName)

Description

[size,dataType,complexity] = getDiscreteStateSpecificationImpl(obj,propertyName)returns the size, data type, and complexity of the discrete state property. This property must be a discrete state property. You must define this method if your System object™ has discrete state properties and is used in theMATLAB Systemblock.

Run-Time Details

getDiscreteStateSpecificationImplis called by theMATLAB Systemblock during Simulink®model compilation.

Method Authoring Tips

  • You must setAccess = protectedfor this method.

  • You cannot modify any properties in this method.

Input Arguments

expand all

System object handle used to access properties, states, and methods specific to the object. If yourgetDiscreteStateSpecificationImplmethod does not use the object, you can replace this input with~.

Name of discrete state property of the System object

Output Arguments

expand all

Vector containing the length of each dimension of the property.

Data type of the property. For built-in data types,dataTypeis a character vector. For fixed-point data types,dataTypeis a numeric type object.

Complexity of the property as a scalar, logical value:

  • true— complex

  • false— real

Examples

expand all

Specify in your class definition file the size, data type, and complexity of a discrete state property.

methods (Access = protected)function[sz,dt,cp] = getDiscreteStateSpecificationImpl(~,name) sz = [1 1]; dt ="double"; cp = false;endend

版本历史

Introduced in R2013b