Requesting message to user for importing data using GUI
1 次查看(过去 30 天)
显示 更早的评论
Hi,
I have results from many experiments. Each experiment has two data files (.dat and .xlsx). my problem each time I need to run my code to analyze data for different experiments I have to copy the (.dat and .xlsx)for that experiment to same folder of my application. Is there anyway to do that using GUI to get browsing windows to import data. So when anyone runs the code the application request from user to import that two files and then open GUI to import that files.
I mean I want when anyone run the code. He/she will get requesting message to upload these files and then open browsing windows to import that files using GUI.
Thanks
0 个评论
采纳的回答
Walter Roberson
2015-11-16
If MATLAB is running on the system that has the files stored, then see uigetfile() to allow the users to select the files to be processed. uigetfile() returns a file name and a directory; you can use fullfile() to put together the directory and file name in order to get a complete path for the file to read. xlsread() will accept such a full path. I do not know how you are reading the .dat file but it can probably accept a full path as well.
If MATLAB is being accessed through a web browser then you would need a different series of steps.
0 个评论
更多回答(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!