https://in.mathworks.com/help/matlab/ref/matlab.system.getdiscretestateimpl.html
matlab.System.getDiscreteStateImpl - Discrete state property values - MATLAB
This MATLAB function returns a struct s of internal state value properties, which have the DiscreteState attribute.
state propertymatlabsystemdiscretevalues