How to get used Matlab Workspace variables within Simulink model
조회 수: 19 (최근 30일)
이전 댓글 표시
Hi there, I have a huge model as legacy knowledge. The model uses about 150 WS variables, but the ini scripts are delivering more than 300. Is there an automatic way to sort out which WS variables the model uses?
Thanks
Nikolay
댓글 수: 2
Santosh Gnanasekaran
2019년 5월 23일
If you have followed a specific pattern of names for parameters, then you can write a script to search and extract all the parameters from the model and then compare it with ini scripts.
채택된 답변
추가 답변 (1개)
Fangjun Jiang
2019년 5월 23일
Simulink Data Dictionary has the capability. You can migrate your workspace variables to a Simulink Data Dictionary. When you do the migration, it only migrates the variables that are used by the model. It will ask you whenther to clear those variables (that has been migrated to a SLDD) from the workspace. If you answer "Yes", then you will be left with a list of variables in the workspace that are not used by the model.
In your Simulink model, click File, Model Properties, Link to Data Dictionary,
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Naming Conventions에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!