On Simulink how to add_block with output data type boolean?

조회 수: 2 (최근 30일)
Uugan
Uugan 2013년 5월 14일
For example:
add_block('built-in/Constant','test/const1','Position',[90 20 110 40],'OutDataType','boolean','Value','1');% 0 or 1
Here on simulink shows constant block with output data type = Inherit from 'Constant value' but I need boolean output. How to do it without changing value as true or false?
  댓글 수: 1
Kaustubha Govind
Kaustubha Govind 2013년 5월 14일
You can see the list of parameters of the Constant block using the following command:
get_param('built-in/Constant', 'DialogParameters')
What is the list of parameters in your version?

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

답변 (1개)

Yao Li
Yao Li 2013년 5월 14일
편집: Yao Li 2013년 5월 14일
add_block('built-in/Constant','test/const1','Position',[90 20 110 40],'OutDataTypeStr','boolean','Value','1');
  댓글 수: 5
Yao Li
Yao Li 2013년 5월 14일
uh, earlier version. I may have a try after work when I'm at home.
Yao Li
Yao Li 2013년 5월 14일
Hi Uugan, I only have 2008b and the above codes also work well with that version. sorry.

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

카테고리

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

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by