MATLAB: How to extract data from a selected file by pressing a push button in GUI

guideMATLAB

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.

Best Answer

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.
Related Question