I was looking for saveAs function. I cannot find documentation for it, though. A complete list of methods for Simulink.ConfigSet class would be handy when I started searching...
How to export Simulink.ConfigSet programmatically to M file?
18 次查看(过去 30 天)
显示 更早的评论
I need to assure consistency in configsets I that I am using in various projects. I work on function which modifies a configset in a defined way and exports the modified configset to M or MAT file. I don't know the 'Name' property of the configset in advance. I have a problem with export to M file.
I am looking for equivalent of GUI procedure described in 'Save a Configuration set' in https://www.mathworks.com/help/simulink/ug/setting-up-configuration-sets.html
I was able to partially solve the problem by creating a temporary Data Dictionary, then Data Dictionary Section 'Configurations', added the current configset as new entry and exported the Section using ExportToFile. However, that creates different output than the GUI procedure for configsets saving.
GUI produces MATLAB function, whereas ExportToFile produces MATLAB script. The function contains some assertions on version, which is convenient so I would like to preserve that. These M files are used differently and my framework is already prepared for the configset as MATLAB function. Moreover I think there must be cleaner solution not involving creating and later deleting dummy files...
I am using MATLAB release R2016a.
It feels like I just cannot find the right command or function, but I have already spent significant time searching without success so I reach out.
Thank you for your time.
0 个评论
采纳的回答
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 COM Component Integration 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!