How to get variables needed for Simulink model?

2 ビュー (過去 30 日間)
Bibigul Shektybayeva
Bibigul Shektybayeva 2017 年 8 月 22 日
回答済み: Brian Hannan 2017 年 8 月 22 日
I have a Simulink model and a large workspace from which I need some variables for the model. I would like to load only those variables that are needed, and not the whole workspace. How can I get the list of variables that are required for the model?

採用された回答

Brian Hannan
Brian Hannan 2017 年 8 月 22 日
See the use of Simulink.findVars at this doc page. Also this blog post might be useful.

その他の回答 (1 件)

KL
KL 2017 年 8 月 22 日
filename = 'yourMatfile.mat';
yourVariables = {'X','caption'};
S = load(filename,yourVariables{:})

カテゴリ

Help Center および File ExchangeSimulink Environment Customization についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by