MATLAB Answers

0

Set Inport to Bus Data type with set_param

Asked by Nathan Zimmerman on 6 Feb 2017
Latest activity Answered by Pooja Hegde on 5 Jun 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?

  0 Comments

Sign in to comment.

1 Answer

Answer by Pooja Hegde on 5 Jun 2018

try using the parameter 'OutDataTypeStr'
set_param(gcb,'OutDataTypeStr','Bus: myBus')

  0 Comments

Sign in to comment.