How to get variables needed for Simulink model?

1 visualización (últimos 30 días)
Bibigul Shektybayeva
Bibigul Shektybayeva el 22 de Ag. de 2017
Respondida: Brian Hannan el 22 de Ag. de 2017
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?

Respuesta aceptada

Brian Hannan
Brian Hannan el 22 de Ag. de 2017
See the use of Simulink.findVars at this doc page. Also this blog post might be useful.

Más respuestas (1)

KL
KL el 22 de Ag. de 2017
filename = 'yourMatfile.mat';
yourVariables = {'X','caption'};
S = load(filename,yourVariables{:})

Categorías

Más información sobre Modeling en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by