How to make an application that uses data files as resource

2 次查看(过去 30 天)
I'm working on an application to batch process CT images. When pressing "run" the application looks for new batches and when done adds these new batches to the list of processed batches. The way it does this is by reading an excel-file with all processed batches to see if there are new batches in a folder, and afterwards the excel-file is overwritten with an extended list.
The users also want the option to set default input and output paths. To save the default paths I use another excel-file in which the current default paths are stored. This file is overwritten when the user changes the default paths. Another excel-file has parameters in it that are used as input in generating statistic reports from the output. Also these parameters can be changed by the user, so the file is overwritten when they are changed.
This works fine on my own PC when unpackaged (Using "Run" in the App Designer), but when I package the application, the app is unable to overwrite the files. It can't find the files.
So my question is, how do you make an application in which the user can set default values or paths so that next time the program is opened the new values or paths or used? Is it a good idea to use external files for this? If so, how would I do it better? How do I need to define the paths to the files in my code?
For the users it would actually be easy to use excel-files for the settings so they can easily make changes when necessary.
All files that where needed were added to "Shared resources and helper files" when packaging.
Any help is highly appreciated!

采纳的回答

Sean de Wolski
Sean de Wolski 2018-5-17
doc setpref
doc getpref
  1 个评论
Tim Van De Looverbosch
Thank you, Sean! I made it work with setpref and getpref. Apparently I missed all documentation about setting preferences completely. Very useful!

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Whos 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by