www.gusucode.com > matlab 案例源码 matlab代码程序 > matlab/DisplayPossiblePropertyValuesExample.m

    %% Display Possible Property Values  
%% 
% Instantiate a timer object and display possible values for the |BusyMode|
% property. 

% Copyright 2015 The MathWorks, Inc.

t = timer;
set(t,'BusyMode') 
%%
% The output shows the three possible values for |BusyMode|. The default
% value, |drop|, is indicated by curly braces.  
%% 
% Display the possible values for |ErrorFcn|. 
set(t,'ErrorFcn') 
%%
% A description of the possible values is displayed since |ErrorFcn| does
% not have a set list of possible values.  
%% 
% Output the possible property values. 
out1 = set(t,'BusyMode')
out2 = set(t,'ErrorFcn') 
%%
% While |set(t,'ErrorFcn')| displays a description of the possible values,
% |out2 = set(t,'ErrorFcn')| returns an empty cell.  
%% 
% Delete the timer from memory. 
delete(t)