-
Notifications
You must be signed in to change notification settings - Fork 3
/
warn.m
22 lines (22 loc) · 1.39 KB
/
warn.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% 'EXTENDED' WARN FUNCTION %%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% % %
% % Author: Frederic Depuydt %
% % Company: KU Leuven %
% % Contact: frederic.depuydt@kuleuven.be; f.depuydt@outlook.com %
% % Version: 1.0 %
% % %
% % A function that will display a warning when executed. %
% % This function extends the native MATLAB warning %
% % with disabled backtracing. %
% % %
% % Function usage: %
% % warn('This is a warning'); %
% % %
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function warn(varargin)
warning off backtrace;
warning(varargin{:});
warning on backtrace;
end