Each time I call the nlfilter
function a progress bar window appears. How could I disable that window?. Is there an option like -q
?
I\'m proces
The waitbar
within MATLAB definitely reduces the performance of your code as well as gets really obnoxious when running long-running tasks on some operating systems as it can steal the focus of your keyboard/mouse randomly.
I personally create my own waitbar
function and place it on the MATLAB path so that it is evaluated rather than the built-in.
I have a more complicated text-based progress bar, but the following function will simply print the messages to the command line. You could even remove the first block and have the contents simply be varargout = {[]};
and you will have no output.
function varargout = waitbar(varargin)
if nargin >= 2 && ischar(varargin{2})
disp(varargin{2})
elseif nargin >= 3 && ischar(varargin{3})
disp(varargin{3})
end
varargout = {[]};
end
Be sure to save this in waitbar.m
somewhere high on your MATLAB path.
NOTE: This will silence all waitbars so if you want to restore the typical waitbar behavior, you will want to remove/rename this file.