Creating Graphical User Interfaces - The MathWorks - #251

/ 520


catalogue search
P. 251
P. 252
P. 253
P. 254
P. 255
P. 256
P. 257
P. 258
P. 259
P. 260
P. 261
P. 262
P. 263
P. 264
P. 265
P. 266
P. 267
P. 268
P. 269
P. 270
P. 271
P. 272
P. 273
P. 274
P. 275
P. 276
P. 277
P. 278
P. 279
P. 280
P. 281
P. 282
P. 283
P. 284
P. 285
P. 286
P. 287
P. 288
P. 289
P. 290
P. 291
P. 292
P. 293
P. 294
P. 295
P. 296
P. 297
P. 298
P. 299
P. 300


See other catalogues for The MathWorks

Text version of the page
Examples: Programming GUIDE GUI Components
switch get(hObject,'Tag') % Get Tag of selected object case 'radiobutton1'
% Code for when radiobutton1 is selected, case 'radiobutton2'
% Code for when radiobutton2 is selected. case 'togglebutton1'
% Code for when togglebutton1 is selected. case 'togglebutton2'
% Code for when togglebutton2 is selected. % Continue with more cases as necessary. otherwise
% Code for when there is no match.
end
See the uibuttongroup reference page for another example.
Axes
Axes components enable your GUI to display graphics, such as graphs and images. This topic briefly tells you how to plot to axes components in your
GUI.
• "Plotting to an Axes" on page 8-31
• "Creating Subplots" on page 8-34
Plotting to an Axes
In most cases, you create a plot in an axes from a callback that belongs to some other component in the GUI. For example, pressing a button might trigger the plotting of a graph to an axes. In this case, the button's Callback callback contains the code that generates the plot.
8-31

pageCatalog pdf di En 2012-06-22-01