I'm working in a GUI in Matlab R2014b that uses some data from a txt file, so i want to call the 'Import Data' window to permit the user select the data from a file when pushing a button. Is there a way to do this?
Asked
Active
Viewed 1,572 times
1 Answers
3
The function uiimport
is used for importing data interactively. This seems to be what gets called by Matlab's toolbar's "import data" button.
Excerpting from the documenatation,
uiimport
opens a dialog to interactively load data from a file or the clipboard. MATLAB® displays a preview of the data in the file.
uiimport('-file')
presents the file selection dialog first.
S = uiimport(___)
stores the resulting variables as fields in the structS
.
So, just set
uiimport('-file');
as the button's callback.

Community
- 1
- 1

Luis Mendo
- 110,752
- 13
- 76
- 147
-
Awesome, this is just want i needed – Isak Baizley Mar 31 '15 at 00:06