How to permanently store Base Workspace variables with Simulink file?
6 次查看(过去 30 天)
显示 更早的评论
Hi all!
I have loaded other people's simulink .MDL files into matlab, and I notice that some new Base Workspace variables become created once the .mdl file has been loaded.
I am extremely interested to learn how to embed BASE Workspace variables within simulink .mdl files.
At the moment, I know how to ADD Base Workspace variables using the Model Explorer (within the simulink system). However, the problem is....when I save the simulink file, those Base Workspace quantities (that I added) do not get saved.
I've been trying to figure out how those people embed those base workspace variables within their simulink files, but haven't figured it out yet. So I thought I'd finally ask how to do this on the forums.
Thanks very much in advance for any help.
0 个评论
采纳的回答
Suneesh
2014-3-3
This is usually done using model callbacks. See:
Using one of the model callbacks like "PostLoadFcn" you may either execute a LOAD statement which loads a MAT file containing all your variables or have a MATLAB script which creates the workspace variables.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Simulink Environment Customization 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!