- To add a button, simply drag one from the component library and place it at any desired location on the UIFigure object created by default. You can change any property of a component by modifying the values in the component properties section. To change the name of a button, modify the Text property.
- Add a Callback function (which can be done by right-clicking the component in consideration and selecting Callbacks) of the browse button to be able to load the contents of a .XLXS file from a browse window. Use the following command in the Callback function to do this.
- The 'uigetfile()' function returns the path to the file (as a string) selected on the browser window. This can be used to read the contents of the file as a table in matlab using the 'readtable()' function. The columns of the table can be accesed individually.
- Add UIAxes and another Button component to your UIFigure. Modify the Text property of this new button to "Plot". Add a Callback function to this new button to calculate and display the required plot on the UIAxes component. This can be done via adding the following command to the Callback function:
- MATLAB App Designer - https://in.mathworks.com/help/matlab/ref/appdesigner.html?searchHighlight=Appdesigner&s_tid=doc_srchtitle
- Writing Callback functions - https://in.mathworks.com/help/matlab/creating_guis/write-callbacks-for-gui-in-app-designer.html
- Opening file selection dialogue box - https://in.mathworks.com/help/matlab/ref/uigetfile.html
- Creating GUI plots using UIAxes - https://in.mathworks.com/help/matlab/ref/uiaxes.html?searchHighlight=UIAxes&s_tid=doc_srchtitle
- Buttons - https://in.mathworks.com/help/matlab/ref/matlab.ui.control.button-properties.html?searchHighlight=Button&s_tid=doc_srchtitle