How to "Create new data" for a custom library block
1 回表示 (過去 30 日間)
古いコメントを表示
Hello all,
I am creating a custom library block for my project which I followed mask concept as Unit delay block. However, I got some difficulties on creating New data for my state variable. Currently, I can only create a state variable which will be stored in data dictionary by default; however, I would like to create as following Unitdelay concept. But I could not find any documents which introduced how to do these stuffs for custom library block.
Or whether are there any Parameter options available for creating this on Mask Editor? Please give me some hints here. Thank you so much!
4 件のコメント
回答 (1 件)
Fangjun Jiang
2023 年 12 月 5 日
編集済み: Fangjun Jiang
2023 年 12 月 5 日
Create a Mask for your customized library block, then when you double click the block, you will have a dialog to specify that parameter, just like the dialog you got when double click the UnitDelay block. The built-in "three dot action button" always appears on the side. Click the button and you will see the "Create variable" or "ParameterName: Create ..." option.
13 件のコメント
Fangjun Jiang
2023 年 12 月 13 日
For new variables, the model workspace option should always be there.
There is API for model workspace too.
参考
カテゴリ
Help Center および File Exchange で Interactive Model Editing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!