How to create a "model parameters" block in Simulink?
2 ビュー (過去 30 日間)
古いコメントを表示
Essentially, I need to recreate the "Model Parameters" block in commpccc (in the communications toolbox). It allows other users to quickly change the model parameters by accessing just one block. We don't want to have to change every value in every block, and we don't want an "initialization" .m -file either. I know this is done via the mask of an empty subsystem, but that's about as far I've got. All help is appreciated!
0 件のコメント
回答 (2 件)
Kaustubha Govind
2014 年 6 月 9 日
Hatem: The model uses a pretty simple mechanism as you've found out already. The mask of the empty subsystem calls a MATLAB file commpccc_init in the Mask Initialization pane (run "which commpccc_init" to find the file), which creates the structure 'prmPccc' in the base workspace. This structure has fields that holds values relevant to various blocks. All blocks in the model refer to fields in this parameter structure.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Simulink Functions についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!