MATLAB SIMULINK 7 - GRAPHICAL USER INTERFACE Manual de usuario Pagina 254

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 500
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 253
9 Examples of GUIDE UIs
9-8
copyfile(fullfile(docroot, 'techdoc','creating_guis',...
'examples','addr*.*')),...
fileattrib('addr*.*', '+w');
guide address_book.fig;
2
In the GUIDE Layout Editor, click the Editor button .
The address_book.m code file opens in the MATLAB Editor.
Calling Syntax
The “address_book_OpeningFcn” on page 9-8 code in address_book.m
interprets the input arguments:
If you call the address_book function with no arguments, the UI displays the
default address book.
If you call the address_book function with a pair of arguments (for example,
address_book('book','my_list.mat')) , the first argument, 'book', is a key
word that the code looks for in the opening function. If the key word matches, the code
uses the second argument as the MAT-file for the address book.
address_book_OpeningFcn
function address_book_OpeningFcn(hObject, eventdata, ...
handles, varargin)
% Choose default command line output for address_book
handles.output = hObject;
% Make figure non-dockable
% set(hObject,'DockControls','off')
set(hObject,'WindowStyle','normal')
set(hObject,'HandleVisibility','callback')
% Update handles structure
guidata(hObject, handles);
if nargin < 4
% Load the default address book
Check_And_Load([],handles);
% If first element in varargin is 'book' and the second element is a
% MATLAB file, then load that file
elseif (length(varargin) == 2 && ...
Vista de pagina 253
1 2 ... 249 250 251 252 253 254 255 256 257 258 259 ... 499 500

Comentarios a estos manuales

Sin comentarios