THE AUDITORY MODELING TOOLBOX

Applies to version: 1.6.0

View the code

Go to function

amt_disp
Overload of the function 'disp'

Usage:

amt_disp(X);
amt_disp(X,'volatile');
amt_disp(X,'documentation');
amt_disp();

Description:

amt_disp(X); can be used to show message X in the command window. The output of amt_disp depends on the start-up configuration of the AMT. X can be a character vector. X can also be a string array, in which case the strings will be concatated without any delimiter.

When the AMT is started in the default mode (verbose), amt_disp will display behaving as the Matlab/Octave funtion disp(), however, the output will not appear in the web documentation. When the AMT is started in the silent mode, amt_disp will never display. See amt_start for further explanation on the start-up configurations.

amt_disp(X,'volatile'); can be used as volatile progress indicator. Any subsequent call of the amt_disp will delete the previous volatile message. This way a changing progress can be clearly shown even in loops. As the default messages, the volatile messages will not appear in the web documentation case. Before the first usage of volatile call amt_disp(''); to indicate that volatile displays will follow. After the last usage, call amt_disp(); to delete the last volatile message and continue in a normal mode, see the followig example:

amt_disp(''); % start of volatile display
for ii=1:20
  amt_disp(['Trial #' int2str(ii) ' of 20...'],'volatile'); pause(0.1);
end
amt_disp(); % make the progress completely disappear

If the last volatile message should persist, use amt_disp([]); after the last volatile message.

amt_disp(X,'documentation'); can be used for information interesting to be displayed in the web documentation.

amt_disp(X,'silent'); does not output at all. This is one of the available modes of the AMT.

amt_disp(X,'no_debug'); does neither output at all. amt_disp(X,'debug'); does output and combined with no_debug, it can be used to implement a function in which the user defines the level of information to be displayed by passing a flag. For example,:

definput.flags.disp = {'no_debug','debug'};
[flags,kv]=ltfatarghelper({},definput,varargin);
...
amt_disp('Displayed only when flag debug provided',flags.disp);

Note that all functions in the AMT need to call amt_disp to print to the command windows. Other functions like fprint or disp will be replaced by amt_disp during the integration process.