Simulink mask display programmatically, how to make line shift?

8 ビュー (過去 30 日間)
Flemming
Flemming 2018 年 9 月 19 日
回答済み: Flemming 2018 年 9 月 20 日
I use this command to set up mask display programmatically:
set_param( gcbh,'MaskDisplay', ['port_label(''input'', 1, ''in1''); port_label(''output'', 1, ''out1'');'] );
In the mask editor it afterwards appears in one line as:
port_label('input', 1, 'in1'); port_label('output', 1, 'out1');
which is a bit annoying when the block has many ports.
How can I make it appear in multiple lines, like:
port_label('input', 1, 'in1')
port_label('output', 1, 'out1')

採用された回答

Fangjun Jiang
Fangjun Jiang 2018 年 9 月 19 日
use char(10),
set_param( gcbh,'MaskDisplay', ['port_label(''input'', 1, ''in1'');',char(10),'port_label(''output'', 1, ''out1'');'] );

その他の回答 (1 件)

Flemming
Flemming 2018 年 9 月 20 日
Thanks, it works.

カテゴリ

Help Center および File ExchangeAuthor Block Masks についてさらに検索

製品


リリース

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by