Discrete state size, data type, and complexity
[sz,dt,cp] = getDiscreteStateSpecificationImpl(obj,name)
[sz,dt,cp] = getDiscreteStateSpecificationImpl(obj,name) returns the size, data type, and complexity of the property, name. 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. If you define this method for a property that is not discrete state, an error occurs during model compilation.
You always set the getDiscreteStateSpecificationImpl method access to protected because it is an internal method that users do not directly call or run.
getDiscreteStateSpecificationImpl is called by the MATLAB System block during Simulink® model compilation.
Vector containing the length of each dimension of the property.
Default: [1 1]
Data type of the property. For built-in data types, dt is a string. For fixed-point data types, dt is a numerictype object.
Complexity of the property as a scalar, logical value, where true = complex and 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