- Collect your input however you want into some variables (cell arrays, matrices, tables, whatever) and save these in a .mat file with save. To get the data back, just load the .mat file. Advantage: dead simple. Disadvantages: can only be read by matlab. Have to read or write everything at once.
- Same, but use a .mat file per user, and another main.mat file to keep track of the individual files. Advantages: fairly simple. A file per user. Disadvantage: can only be read by matlab.
- Save your data in a table. And use writetable, readtable to save/restore the data. Advantages: fairly simple, nice organisation of the data. Can be read by other software. Disadvantage: Everything in one file
- Save and read the data yourself using low level functions. Advantage: Use whatever format you wish (xml, json, etc.). Disadvantages: More code to write
- Save the data in a database. Advantage: Exactly designed for this type of storage. Disadvantages: requires the database toolbox or a fair amount of coding using COM or .Net interface.
- Use OOP, with objects representing your data. And save these objects as .mat file. Advantages: OOP advantages: encapsulation, inheritance, etc. Disadvantages: require a fair amount of coding.
How to get matlab to save acquired user input in a file/profile?
1 次查看(过去 30 天)
显示 更早的评论
Hi,
I'm trying to collect information (car specifications) through a dialog-box, and then save this into a file/profile or something. So when you run the script a dialog-box pops up and you get to fill in blanks and then the script will put this information into a file and save this. Thereafter matlab will spit out all the data which can be calculated with the given information. Can someone explain me how to get matlab to save user input in a file, and how to recall this later? I'd be very thankful for your help.
0 个评论
采纳的回答
Guillaume
2014-12-1
You have plenty of options:
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Startup and Shutdown 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!