Simulink bus not working the way i intended

3 ビュー (過去 30 日間)
Alberto Belvedere
Alberto Belvedere 2021 年 1 月 24 日
回答済み: Vimal Rathod 2021 年 1 月 28 日
I'm using Vehicle Body 3 dof single track block to perform some testing on my control strategy.
However, i can't get the info port to work properly.
Its output is a bus containing several fields.
I want one field (BdyFrm, that in turn contains other fields) as input of MATLAB function.
At first, i use the bus selector block to extract the BdyFrm field and then i connect it to the "u" port.
Doing this connection, i dont get a struct that matches the bus. Instead I get a simple messy array (as shown in the black rectangle of the image). How can i manage to get "u" as a struct with the same fields of the bus and not as a simple array?
Even if i directly connect Info to u, i always get an array and not a struct.
What am i doing wrong?

回答 (1 件)

Vimal Rathod
Vimal Rathod 2021 年 1 月 28 日

カテゴリ

Help Center および File ExchangeMATLAB についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by