MATLAB SIMULINK 7 - GRAPHICAL USER INTERFACE Spezifikationen Seite 151

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 180
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 150
Accessing Workspace Variables from a List Box
5-27
var1 = list_entries{index_selected(1)};
var2 = list_entries{index_selected(2)};
end
Callbacks for the Plotting Buttons
The callbacks for the plotting buttons call get_var_names to get the names of
the variables to plot and then call
evalin to execute the plot commands in the
base workspace.
For example, here is the callback for the
plot function:
function varargout = plot_button_Callback(h,eventdata,handles,varargin)
[x,y] = get_var_names(handles);
evalin('base',['plot(' x ',' y ')'])
The command to evaluate is created by concatenating the strings and variables
that result in the command:
plot(x,y)
Seitenansicht 150
1 2 ... 146 147 148 149 150 151 152 153 154 155 156 ... 179 180

Kommentare zu diesen Handbüchern

Keine Kommentare