matlab.system.getDiscreteStateSpecificationImpl - Discrete state size, data type, and complexity - MATLAB (original) (raw)
Main Content
Discrete state size, data type, and complexity
Syntax
[size,dataType,complexity] = getDiscreteStateSpecificationImpl(obj,propertyName)
Description
[[size](#btzu83r-1-sz),[dataType](#btzu83r-1-dt),[complexity](#btzu83r-1-cp)] = getDiscreteStateSpecificationImpl([obj](#btzu83r-1%5Fsep%5Fmw%5F353aa417-3412-46f8-81f1-586adf7da5a8),[propertyName](#btzu83r-1-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.
Run-Time Details
getDiscreteStateSpecificationImpl
is called by theMATLAB System block during Simulink® model compilation.
Method Authoring Tips
- You must set
Access = protected
for this method. - You cannot modify any properties in this method.
Input Arguments
System object handle used to access properties, states, and methods specific to the object. If your getDiscreteStateSpecificationImpl
method does not use the object, you can replace this input with ~
.
Name of discrete state property of the System object
Output Arguments
Vector containing the length of each dimension of the property.
Data type of the property. For built-in data types,dataType
is a character vector. For fixed-point data types, dataType
is a numeric type object.
Complexity of the property as a scalar, logical value:
true
— complexfalse
— real
Examples
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
Version History
Introduced in R2013b