Simulink User Defined Matlab Function Block output "String" to display box

I have a simple User Defined Matlab Function block with inputs and outputs that runs some math operations. I want to output "Pass" or "Fail" string from my Matlab Function block (depending on my calculations within the block) then connect this output to a display box and have it display "Pass" or "Fail". How is this accomplished? I am new to simulink and can't figure this out. I presume it is pretty straightforward.
How do I perform the below. How do I define the parameters within the matlab function block.
Matlab Function Block -> Output "pass" or "fail" string -> Display Box
Thank you. I appreciate anyone that can help me out.

 채택된 답변

Ameer Hamza
Ameer Hamza 2020년 5월 17일

1 개 추천

See the attached Simulink model. Note that I have set the Sample time of MATLAB function block to discrete by right-clicking on the block and opening the "Subsystem Parameters".

댓글 수: 2

Ameer! You are a life saver. Thank you, that works. I was making my code way over complicated. Have a good day!
I am glad to be of help!

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

추가 답변 (0개)

카테고리

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

제품

릴리스

R2020a

질문:

2020년 5월 17일

댓글:

2020년 5월 17일

Community Treasure Hunt

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

Start Hunting!

Translated by