Set Inport to Bus Data type with set_param

2 visualizaciones (últimos 30 días)
Nathan Zimmerman
Nathan Zimmerman el 6 de Feb. de 2017
Respondida: Pooja Hegde el 5 de Jun. de 2018
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?

Respuestas (1)

Pooja Hegde
Pooja Hegde el 5 de Jun. de 2018
try using the parameter 'OutDataTypeStr'
set_param(gcb,'OutDataTypeStr','Bus: myBus')

Categorías

Más información sobre Simulink Functions en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by