How to create a "model parameters" block in Simulink?
2 views (last 30 days)
Show older comments
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 Comments
Answers (2)
Kaustubha Govind
on 9 Jun 2014
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 Comments
See Also
Categories
Find more on Simulink Functions in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!