How to extract data from a selected file by pressing a push button in GUI ?
22 views (last 30 days)
Show older comments
Atul Tiwari
on 5 Jan 2014
Commented: Atul Tiwari
on 8 Jan 2014
Hello.. I am trying to develop a GUI in which we can select a file(.txt) by pressing a push button(load) and after that we can extract data points(X,Y) from this file. It is showing a dialogue box and selecting a file from a folder but unable to extract data points from the file so that i can use these data points to plot a graph.
2 Comments
Accepted Answer
Walter Roberson
on 7 Jan 2014
fscanf(), textscan(), dlmread() -- all can be used to extract data from a text file and convert the data to numeric form.
plot() can be used to plot line graphs.
To transfer data between routines see http://matlab.wikia.com/wiki/FAQ#How_can_I_share_data_between_callback_functions_in_my_GUI.3F
2 Comments
Image Analyst
on 7 Jan 2014
As can csvread(), xlsread(), importdata(), load() and maybe some more functions. Some are best suited towards particular formats.
More Answers (0)
See Also
Categories
Find more on Graphics Object Properties in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!