(Simulink) Passing a string from the mask to a block

Hi,
I want to read a .mat file but I want to pass the name of the .mat file from the mask (only 1 level higher). I can't figure out how to do this. Any idea?
tnx, Rouzbeh

2 件のコメント

Alon Spinner
Alon Spinner 2021 年 5 月 2 日
Have you figured it out?
Fangjun Jiang
Fangjun Jiang 2021 年 5 月 3 日
Simulink now supports string data type. But if just need to pass the name of the .mat file from mask to inside the masked subsystem, to be used by any callback functions, then use an Edit box to store or enter the file name, in the mask dialog

サインインしてコメントする。

回答 (2 件)

Kaustubha Govind
Kaustubha Govind 2011 年 11 月 21 日

0 投票

The documentation page Creating a Block Mask explains creation of mask parameters. Please post back if you run into specific issues after following this procedure.
Fangjun Jiang
Fangjun Jiang 2011 年 11 月 21 日

0 投票

String data type is supported for Simulink blocks, see Simulink->Model-Wide Utilities->Block Support Table. But you can use string for annotation or mask display. How do you plan to use the .mat file name?

カテゴリ

ヘルプ センター および File ExchangeAuthor Block Masks についてさらに検索

製品

タグ

質問済み:

2011 年 11 月 21 日

コメント済み:

2021 年 5 月 3 日

Community Treasure Hunt

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

Start Hunting!

Translated by