Documenting an evolving Simulink model
조회 수: 6 (최근 30일)
이전 댓글 표시
I am running a script that loops through parameters and runs Simulink for each combination. At the end of each model run, I save key results and the parameters in a mat file. But the model itself is changing as we improve the algorithm. In the same mat file, I would also like to save information on the model setup/topology at a level sufficient to identify if differences in the results are due to differences in the model. (We do not presently use version control software).
What is the best way to save the model setup, if it can be done? My default solution is to save the *.mdl file for each model run, which seems inefficient.
댓글 수: 0
채택된 답변
Kaustubha Govind
2012년 2월 22일
By model setup - if you mean just parameters, then you can of course make them all workspace variables and save the values of those variables in a MAT-file for each run. You can also store your Configuration Parameters setting, by getting the ConfigSet object using the getActiveConfigSet function and save that object also in the MAT-file. However, to save the topology itself, the only other way (besides saving the entire .mdl file) that I can think of is to use the XML Comparison Report that you can save as a ZIP-file. I think you need access to Simulink Report Generator to use the tool though.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Programmatic Model Editing에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!