how to display text in simulink?

28 ビュー (過去 30 日間)
ahmedalkhair mostafa
ahmedalkhair mostafa 2017 年 12 月 13 日
回答済み: Abhipsa 2025 年 3 月 5 日
is it possible to make the display block output text? I want to display 3 words based on output from Simulink block

回答 (1 件)

Abhipsa
Abhipsa 2025 年 3 月 5 日
I understand that you want to display words according to the output produced by a Simulink block.
You can achieve this by using the MATLAB function block and the Simulink display block which is present in Simulink > Sink.
You can follow these steps to achieve the same:
  1. Create a MATLAB function block which will contain the logic of displaying the desired output word or string according to the Simulink block’s output.
  2. Connect the MATLAB is function block with the Simulink output block such that the MATLAB function block receives input from it.
Connect a Simulink display block to the output signal of MATLAB function block.
For a better understanding you can refer to the sample model below:
Please ensure to keep your output words in double quotes, so that it will be recognised as a Simulink string.
Please refer to the MATLAB documentation of “Simulink Strings” for more details:
I hope this will help you in implementing your requirements.

カテゴリ

Help Center および File ExchangeString についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by