list all variable literals used in a model
1 回表示 (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Dependency Analysis についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!