- This can be achieved using Dynamic Masked Subsystems, which are masked library blocks that can modify their structural contents. You can find more information about them in the documentation : https://www.mathworks.com/help/releases/R2023b/simulink/ug/create-dynamic-masked-subsystems.html
- You can refer to this article to achieve this specifically for masked subsystems containing S-Functions: https://www.mathworks.com/matlabcentral/answers/97278-can-my-s-function-have-variable-number-of-inputs-and-outputs
Change number of connection ports of a mask depending on user input?
3 ビュー (過去 30 日間)
古いコメントを表示
I have the following problem in Simulink: I want to change the number of port connections depending on the user input. If the user for example writes the following Parameters into the User Input,
then the block should look like this:
I want to use the block inside a library, so i think it should be written in the callback of the mask, but up to now i haven't found a solution for this.
0 件のコメント
回答 (1 件)
Govind KM
2024 年 8 月 22 日
Hi Bernhard,
As I understand, you want to change the number of input/output port connections based on user input.
Hope this helps!
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Author Block Masks についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!