How do I avoid variable (or file) name conflicts when using multiple copies of library subsystems with To Workspace (or To File) blocks?
이전 댓글 표시
I am creating a model and using a subsystem that I created and placed in a custom library. This subsystem has a To Workspace block in it that has the default variable name as 'simout'. Thus this block will save data to a variable named 'simout' in the MATLAB workspace.
The problem is that when I use two copies of this subsystem block, I now face a naming conflict as two blocks are trying to save data to the same variable. In order to change the variable name, I need to break the library link. However, I need to retain the library link as I need to make changes to the subsystem block.
The same issue arises if I have a To File sink block instead of a To Workspace block in my library subsystem.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Programmatic Model Editing에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!