Stateflow array of buses

7 ビュー (過去 30 日間)
Valentin Kaisermayer
Valentin Kaisermayer 2018 年 2 月 1 日
回答済み: Valentin Kaisermayer 2018 年 2 月 2 日
Hello,
i have working Matlab code with a section of it like this:
coefs(1).c = a1;
coefs(2).c = a2;
coefs(3).c = a3;
where
a1, a2, a3
are 2x6 arrays.
Now I wanted to implement this in a stateflow diagramm but I can't figure out how to define the bus for stateflow.
the corresponding stateflow code is like the above code and the datatyp of the variable "coefs" is "COEFS".
Valentin

採用された回答

Valentin Kaisermayer
Valentin Kaisermayer 2018 年 2 月 2 日
I solved it my self. The problem was that Matlab could not determine the size of the variable. So I initalized it in the Matlab function:
coefs_ = repmat(struct('c',zeros(2,6)),1,3);

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeView and Analyze Simulation Results についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by