MATLAB Creating Graphical User Interfaces

(ff) #1

Create a Simple App Programmatically


NoteThis topic applies to apps you create programmatically using the figure function.
For alternative ways to build apps, see “Ways to Build Apps” on page 1-2.

This example shows how to create a simple app programmatically, such as the one shown
here.

Subsequent sections guide you through the process of creating this app.

If you prefer to view and run the code that created this app without creating it, set your
current folder to one to which you have write access. Copy the example code and open it
in the Editor by issuing the following MATLAB commands:

copyfile(fullfile(docroot, 'techdoc','creating_guis',...
'examples','simple_gui2*.*')), fileattrib('simple_gui2*.*', '+w');
edit simple_gui2.m

3 A Simple Programmatic App

Free download pdf