Set Inport to Bus Data type with set_param

10 ビュー (過去 30 日間)
Nathan Zimmerman
Nathan Zimmerman 2017 年 2 月 6 日
回答済み: Pooja Hegde 2018 年 6 月 5 日
I am attempting to change the type of an inport programatically without the GUI to a bus type. I have a bus object called 'myBus' . I have an inport selected and I attempt the following in matlab:
set_param(gcb,'DataType','Bus: myBus')
Though I get the error: 'Invalid setting in Inport block 'myInport' for parameter 'DataType''
However, this does work for
set_param(gcb,'DataType','single')
Any idea how I can set a inport to a bus object without the GUI?

回答 (1 件)

Pooja Hegde
Pooja Hegde 2018 年 6 月 5 日
try using the parameter 'OutDataTypeStr'
set_param(gcb,'OutDataTypeStr','Bus: myBus')

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by