Saving base workspace to .mat file multiple times in GUIDE GUI
2 次查看(过去 30 天)
显示 更早的评论
Hi,
From looking at previous threads, I've seen how you save the workspace to a file (thank you Jan Simon) but I was wondering if you could do this more than once.
I would like my user to be able to change a load of variables in the GUI, and if they like the outputs, be able to save that data to an .mat file. Then, if they have another fiddle and want to save some more data, it would save to a seperate .mat file.
Is this possible? Or is there a quick trick to writing the code to make it work elegantly?
Thanks,
2 个评论
Matt J
2013-7-4
Do you really mean "save it to a .mat file"? A .m file is a file containing code, not data.
采纳的回答
Guru
2013-7-4
Yes it's possible.
All you really need is to have a means to choose what to name your MAT-file from your GUI.
This can be done by having an Edit textbox control in your GUI, or using some other means with the UI controls to prompt the user for a filename.
4 个评论
Guru
2013-7-6
Well place the save command code I put in the previous comment with your evalin commands. That should work.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Migrate GUIDE Apps 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!