Requesting message to user for importing data using GUI

1 vue (au cours des 30 derniers jours)
Ali Kareem
Ali Kareem le 16 Nov 2015
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

Réponse acceptée

Walter Roberson
Walter Roberson le 16 Nov 2015
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.

Plus de réponses (0)

Catégories

En savoir plus sur File Operations dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by