Académique Documents
Professionnel Documents
Culture Documents
Function 1:
20. It is clear that subplot 1 is plotting a 22. Although the GUI layout have
1D graph while subplot 2 consists of completed, but all the buttons are
a mesh of 2D graph. not working. This is due to no call
21. The is all we need to do to create back function is define.
the layout of the GUI. When we run 23. Now, defining the callback function
the program, the compiler will read one by one, staring from popup
the program function by function menu:
and performs it one by one, so the Defining itself as the
popup menu callback
Get the string
value from hpopup
CONCLUSION
In this assignment, Graphical User
End of global function, f Interface (GUI) is introduced. There are 2 way in
creating a GUI i.e. using GUIDE or manual
programming. GUIDE provides a drag and drop
29. This is the end of programming. The
interface to the programmer to design the GUI
output of the programming will be layout while creating 2 file i.e. M-file and FIG file
same as figure 2, except all it button to stores both programming and layout. Most GUI
is functioning. programmer prefers to use GUIDE because the
layout can be created easily. However, it is not
Figure 3: Plotting a contour graph of Axis the best way of designing an GUI. A M-file
parallel hyper-ellipsoid function created by GUIDE consists of many unknown
keyword and function. That is not something
good to a programmer when the program created
by him/her is not fully mastered by him/her. This
Assignment, however, uses another way of
creating GUI, i.e. by plain (manual) programming.
The difference between programming a GUIDE
created program and manually program GUI is
that a manually programming created GUI needs
a position declaration in every layout button
(character), which is not needed in GUIDE
created M-file. The position stated may need
some try and error procedures before it reaches
best layout. However, this problem can be
overcome by aligning them with each other and
set them (unicintrols) to normalize. It should be
note that MATLAB programming are very similar
to C++ programming language. It is case
sensitive, i.e. an upper case and it lower case are
mutually exclusive. Wrong case will result in non
functionable function or program.This assignment
shows the way to derive a 1D and 2D function
from a summation equation, The same method
can be use at a higher level or dimension. This
GUI uses, static text, popup menu, panel, bush
button and toggle button as user interface
control.
References
1. MATLAB e-book (pdf file),
MATLAB programming,
Build GUI.