Matlab System: Variable-Size Discrete-State

I'm currently working with Matlab Systems and want to implement them in Simulink. Therefore, a simple system shall be developed, which uses mechanical system parameter (M,K,D) and dt to estimate structural responses (x,v,a). This approach works perfectly for for different model sizes, as I set getOutputSizeImpl and getDiscreteStateSpecificationImpl to the correct values.
Is there a way to set the discrete states and the output variable-sized (depending on (M,K,D))? For the Output there is isOutputFixedSizeImpl, but I still need to define getOutputSizeImpl. The developed code is given in the attachments.
Simulink Error: Dimensions for state property 'z' changed. Data type, dimensions and complexity for DiscreteState and ContinuousState properties cannot change after the System object is locked.

Answers (0)

Categories

Products

Asked:

on 12 Dec 2017

Edited:

on 13 Dec 2017

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!