MATLAB SIMULINK 7 - GRAPHICAL USER INTERFACE Manuale Utente Pagina 113

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 500
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 112
Add Components to the GUIDE Layout Area
6-27
If you want to set the position or size of the component to an exact value, then modify
its Position property. See “Locate and Move Components” on page 6-74 and
“Resize GUIDE UI Components” on page 6-67 for details.
To add an image to a push button, assign the button's CData property as an m-
by-n-by-3 array of RGB values that defines a truecolor image. You must do this
programmatically in the opening function of the UI code file. For example, the array
img defines a 16-by-64-by-3 truecolor image using random values between 0 and 1
(generated by rand).
img = rand(16,64,3);
set(handles.pushbutton1,'CData',img);
where pushbutton1 is the push button's Tag property.
Note See ind2rgb for information on converting a matrix X and corresponding
colormap, i.e., an (X, MAP) image, to RGB (truecolor) format.
Slider
To create a slider as shown in this figure:
Vedere la pagina 112
1 2 ... 108 109 110 111 112 113 114 115 116 117 118 ... 499 500

Commenti su questo manuale

Nessun commento