Discrete state size, data type, and complexity
[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 the MATLAB System block.
complexity] = getDiscreteStateSpecificationImpl(
getDiscreteStateSpecificationImpl is called by the
MATLAB System block during Simulink® model compilation.
You must set
Access = protected for this method.
You cannot modify any properties in this method.
obj— System object
System object handle used to access properties, states, and methods specific to the object. If
getDiscreteStateSpecificationImpl method does not use the object, you can replace this
propertyName— Discrete state property name
Name of discrete state property of the System object
size— Property size
[1 1](default) | numeric vector
Vector containing the length of each dimension of the property.
dataType— Property data type
double(default) | character vector
Data type of the property. For built-in data types,
dataType is a character vector. For fixed-point data
dataType is a numeric type object.
complexity— Complexity of the property
Complexity of the property as a scalar, logical value:
true — complex
false — real
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; end end