- https://www.mathworks.com/help/simulink/ug/what-is-matlab-system-block.html
- https://www.mathworks.com/help/simulink/ug/customize-system-object-dialog-box-using-mask-editor.html
How to implement a cascading option in simulink?
8 次查看(过去 30 天)
显示 更早的评论
I want to implement cascading options in Simulink Mask Dialog, and I also want to use pure code in a MATLAB System block to achieve this cascading. Are there any methods?
e.g. There are two attributes Name & Value
Name: aaa, bbb
If I select "aaa," the values displayed will be 333 and 444; if I select "bbb," the values displayed will be 666 and 777.
0 个评论
回答(1 个)
Sahas
2024-10-23,10:12
As per my understanding, you would like to use the MATLAB System block in Simulink and define two mask parameters "Name" and "Value" and the values of "Value" parameters should depend on value selected for "Name" parameter.
I was able to create and modify the mask parameters of the MATLAB System block by creating a small callback function and using MATLAB's "get_param" and "set_param" functions to access and setting the mask parameters. For more information and steps to write Mask Parameters callback code, refer to the folloing MathWorks documentation:
Refer to the following MathWorks documentation links for detailed instructions to create custom MATLAB System blocks and steps to modify it's mask parameters:
I hope this is beneficial!
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Subsystems 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!