How to get variables needed for Simulink model?
1 次查看(过去 30 天)
显示 更早的评论
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?
0 个评论
采纳的回答
更多回答(1 个)
KL
2017-8-22
filename = 'yourMatfile.mat';
yourVariables = {'X','caption'};
S = load(filename,yourVariables{:})
0 个评论
另请参阅
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!