How to detect data type of Inport/Outport Signals of SIMULINK model via MATLAB code

I am making a testing tool in which I need to detect the data type of signals coming out of Inports as well as data type of signals feeding Outports. I require to do this via MATLAB code.
Is there any command or method via which we can get details of data type of any link between two blocks of SIMULINK model to our MATLAB code?

 채택된 답변

to filter out Inports and outports you can use find_sys() and to get their data types, for every inport or outport block use
get_param('Inport or Outport Block Name','OutDataTypeStr')

댓글 수: 2

i meant find_system,
i.e.,
AllBlocks= find_system(ModelName, 'Type', 'block');
for every Block in All Blocks, if Block Type is Inport or Outport (use
get_param(BlockName, 'BlockType') )
then find its data type by
get_param('Inport or Outport Block Name','OutDataTypeStr')
Dear, Elangovan Shanmugam Thank you for helping. This satisfied my requirement

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Event Functions에 대해 자세히 알아보기

제품

태그

아직 태그를 입력하지 않았습니다.

질문:

2013년 9월 20일

Community Treasure Hunt

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

Start Hunting!

Translated by