list all variable literals used in a model

조회 수: 2 (최근 30일)
Jürgen
Jürgen 2018년 1월 12일
Hello! I want to know all variable-literals needed to operate in a Simulink model. When you google for this subject you get advised to read the documentation of Simulink.findVars. However Simulink.findVars analyzes a model that is already initialized and compiled to an object in memory. All the necessary variables must be already preset in some memory scopes (base- or model-workspace or data-dictionary or mixture of these…). The situation that I target is different. I have a new big model without any variables initialized (all above variable-scopes completely empty). I could now click through all blocks of my model and copy all variable literals found in block-interfaces, masks,… . Is there a way to get the corresponding list of variable-literals by a simple command? I already thought about something funny like trying(try-catch) to run the uninitialized model / fetch and analyze the errors thrown / create dummy variables in base / … and finally use ‘myVarList =who; ’… . This approach might run into difficulties and get very complicated because most likely the compilation process might check the variable type of the dummy variables… and a lot of additional work might be necessary – if such an approach should work at all. Thank you! Jürgen Müller

답변 (0개)

카테고리

Help CenterFile Exchange에서 Dependency Analysis에 대해 자세히 알아보기

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by