Using GUI to saving/loading directory.
1 次查看(过去 30 天)
显示 更早的评论
Hi, I have a question.
I'm writing a scripts that converts data files, after that I'm converting them to exe files using deploytool.
Can I add to them a GUI interface, that would choose a loading and saving directory on hard drive?
Thanks.
0 个评论
回答(2 个)
John Petersen
2013-2-5
Put this in your callback
[filedat,pathdat] = uigetfile('*.dat','Select a Data File');
Then you can import the file and do what you want with it.
4 个评论
Jan
2013-2-6
@ZK: Use absolute file names in fopen(), when the files are in another folder. fullfile() creates such names. A more general idea: always using absolute filenames avoids problems of unexpected changes of the current folder, e.g. from a GUI or TIMER callback.
UIGETDIR searches for folders, therefore you cannot specify, which kind of files you are searching for. Please explain, what you actually want to do.
Image Analyst
2013-2-6
Sure. You can use something like MAGIC to list your files in a listbox to make it convenient for your users to specify files.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 File Operations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!