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.
Method Authoring Tips
You must set
Access = protectedfor 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
false (default) |
Complexity of the property as a scalar, logical value:
Specify Discrete State Property Size, Data Type, and Complexity
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
Introduced in R2013b