How can I extract configuration parameters from a model?

I want to save all the config params from a model so that I can use the same set in another model. How can I do that?

 채택된 답변

MathWorks Support Team
MathWorks Support Team 2018년 12월 3일

0 개 추천

You can save the settings of configuration sets as MATLAB® functions or scripts. Using the MATLAB function or script, you can share and archive model configuration sets. You can also compare the settings in different configuration sets by comparing the MATLAB functions or scripts of the configuration sets.
To save an active or inactive configuration set from the Model Explorer:
  1. Open the model.
  2. Open the Model Explorer.
  3. Save the configuration set:
  • In the Model Hierarchy pane:
  • Right-click the model node and select Configuration > Export Active Configuration Set.
  • Right-click a configuration set and select Export.
  • Select the model. In the Contents pane, right-click a configuration set and select Export.
  • In the Export Configuration Set to File dialog box, specify the name of the file and the file type. If you specify a .m extension, the file contains a function that creates a configuration set object. If you specify a .mat extension, the file contains a configuration set object.
  • Click Save. The Simulink® software saves the configuration set.
You can load configuration sets that you previously saved as MATLAB functions or scripts.
To load a configuration set from the Model Explorer:
  1. Open the model.
  2. Open the Model Explorer.
  3. In the Model Hierarchy pane, right-click the model and select Configuration > Import.
  4. In the Import Configuration Set From File dialog box, select the .m file that contains the function to create the configuration set object, or the .mat file that contains the configuration set object.
  5. Click Open. The Simulink software loads the configuration set.
  6. Optionally, activate the configuration set. For more information, see Activate a Configuration Set.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Programmatic Model Editing에 대해 자세히 알아보기

제품

릴리스

R2018a

태그

아직 태그를 입력하지 않았습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by