필터 지우기
필터 지우기

How to change the data type of an Inport block ? Eg from 'Inherit: auto' to 'Bus: abc'

조회 수: 4 (최근 30일)
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.

채택된 답변

Birdman
Birdman 2018년 2월 19일
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
Darshan Reddy
Darshan Reddy 2018년 2월 19일
:D Many thanks. This is what i was looking for.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Event Functions에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by