フィルターのクリア

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 Center および File ExchangeModel, Block, and Port Callbacks についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by