MATLAB SIMULINK 7 - GRAPHICAL USER INTERFACE Bedienungsanleitung Seite 477

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 500
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 476
UI for a Program That Accepts Arguments
14-33
1
Clicking a color cell toggle button makes the program perform these actions:
Display the selected color in the preview area.
Display the red, green, and blue values for the newly selected color are displayed
in the R, G, and B fields in the UI.
2
Clicking the Eraser toggle button is equivalent to selecting no color.
3
Clicking the More Colors button displays a second dialog box containing more
colors.
4
Clicking the close box on the main dialog returns a function handle. You can call the
returned function to get the RGB values of the selected color. For example, this code
calls the ColorPalette program, which returns a function handle in the variable,
getmycolor. The second line calls getmycolor to get the RGB values.
getmycolor = colorPalette;
rgb = getmycolor();
The getmycolor function returns a 1-by-3 vector of values. It returns a NaN value if
the user selects the Eraser button.
Call the colorPalette Function With Input Arguments
You can call the colorPalette function with input arguments:
Seitenansicht 476
1 2 ... 472 473 474 475 476 477 478 479 480 481 482 ... 499 500

Kommentare zu diesen Handbüchern

Keine Kommentare