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.

回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeCreate System Objects についてさらに検索

質問済み:

2017 年 12 月 12 日

編集済み:

2017 年 12 月 13 日

Community Treasure Hunt

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

Start Hunting!

Translated by