GUI Axes
GUI Axes
creates an axes graphics object in the current figure using default property
values. axes for creating graphics objects. MATLAB uses default values for any
properties that you do not explicitly define as arguments. the basic purpose of an axes
object is to provide a coordinate system for plotted data, axes properties provide
control over the way MATLAB displays data. axes(h) makes existing axes h the
current axes and brings the figure containing it into focus. It alsomakes h the first
axes listed in the figure and sets the figure as CurrentAxes to h. The current axes is
the target, that draw image, line, rectangle, surface, and text graphics objects.
h1=findobj('Tag','a');
x=str2double(get(h1,'string'))
h2=findobj('Tag','b');
y=str2double(get(h2,'string'));
switch get(get(handles.up1,'SelectedObject'),'Tag')
case 'rb1'
z=num2str(x+y);
case 'rb2'
z=num2str(x-y);
case 'rb3'
z=num2str(x*y);
case 'rb4'
z=num2str(x/y);
end
h3=findobj('tag','c')
set(h3,'string',z);
HOW to Call SIMULation Model (ex: simif.xls)from GUI
open_system('simif.slx'); % load system 'simif.xls' and show the model on screen
Quiz: design GUI with 2 radiobutton : if both are on then show trees.tif image, if one
of them on, show cameraman.tif, if both are off show rice.png image.
1- For this quiz: Need radio-bottun group or isolated radio bottun?
2- can use: 1 axes , 2 axes, 3 axes: (what is your opinion about the best of them ?)
Quiz: design GUI with one edit_text for enter image file by keyboard. 3 radiobottun
(text: rotate -90,rotate +90,unrotated) and one axes for show the image
according to the radio selected option.
Quiz:design 2 GUI: 1st GUI (gui_fct.fig) :has 2 push bottun (! , exit) and 2 edit_text
for enter value by key board then display its factorial, 2nd GUI has 3 push
bottun with tag (Drow, factorial, Exit), and 2 axes with tag (a1,a2), when:
1- press 1st push button (drow), the 1st axes shows 'cameraman.tif ',2nd axes:'trees.tif '
2- press 2nd button (factoreal) to call GUI ( gui_f.fig ) in the 1st page.
3- press 3rd button (Exit) will stop the running.