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에서 Standard File Formats에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!