Create a GUI with OML Commands

Create a graphical user interface with OML commands and functions.

The software installation includes OML commands and functions with which you can create graphical user interfaces and, with the appropriate input entries, graphical widgets, such as pushbuttons, sliders, and drop-down menus.

Typically, combinations of the following functions are used to create a GUI:

  • uipanel
  • uicontrol
  • uibuttongroup
  • uitable
  • uigetdir, uiputfile, uigetfile
  • uiresume, uiwait

Try executing the following code to produce a figure with an edit box.

figure_handle = figure();
set(figure_handle,'Name','GUI Demo','Position',[100 50 500 250]);
uicontrol(figure_handle,'Style','edit','Position',[50 50 300 25]);


Notice that the uicontrol function is used with arguments to generate the demonstrated edit box. Similarly, you can use other GUI functions and arguments to create a wide range of widgets.