How to change the data type of an Inport block ? Eg from 'Inherit: auto' to 'Bus: abc'
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Darshan Reddy
am 19 Feb. 2018
Kommentiert: Birdman
am 19 Feb. 2018
I am trying to change the data type of Inport blocks from 'Inherit: auto' to 'Bus:'. I want to know if there is any command to do such a thing or how to write a script for it.
0 Kommentare
Akzeptierte Antwort
Birdman
am 19 Feb. 2018
There are two lines of code for it in command line. First you need to define a bus, and then you need to create its element(since it has 0 elements by default).
InBus=Simulink.Bus;
InBus.Elements=Simulink.BusElement;
These code creates a bus and its element. Then, choose Bus for inport and write InBus.
4 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Event Functions finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!