Home > matlab > warning_config.m

warning_config

PURPOSE ^

Activates useful warnings

SYNOPSIS ^

function warning_config()

DESCRIPTION ^

 Activates useful warnings

 INPUTS
   none
             
 OUTPUTS
   none
        
 SPECIAL REQUIREMENTS
   none

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function warning_config()
0002 % Activates useful warnings
0003 %
0004 % INPUTS
0005 %   none
0006 %
0007 % OUTPUTS
0008 %   none
0009 %
0010 % SPECIAL REQUIREMENTS
0011 %   none
0012 
0013 % Copyright (C) 2008-2012 Dynare Team
0014 %
0015 % This file is part of Dynare.
0016 %
0017 % Dynare is free software: you can redistribute it and/or modify
0018 % it under the terms of the GNU General Public License as published by
0019 % the Free Software Foundation, either version 3 of the License, or
0020 % (at your option) any later version.
0021 %
0022 % Dynare is distributed in the hope that it will be useful,
0023 % but WITHOUT ANY WARRANTY; without even the implied warranty of
0024 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0025 % GNU General Public License for more details.
0026 %
0027 % You should have received a copy of the GNU General Public License
0028 % along with Dynare.  If not, see <http://www.gnu.org/licenses/>.
0029 
0030 warning on;
0031 
0032 % Display a calling stack trace when a warning is issued
0033 warning('on', 'backtrace');
0034 
0035 if exist('OCTAVE_VERSION')
0036     warning('off', 'Octave:separator-insert');
0037     warning('off', 'Octave:matlab-incompatible');
0038     warning('off', 'Octave:single-quote-string');
0039     warning('off', 'Octave:missing-semicolon');
0040     warning('off', 'Octave:empty-list-elements');
0041     warning('off', 'Octave:num-to-str');
0042     warning('off', 'Octave:resize-on-range-error');
0043     warning('off', 'Octave:str-to-num');
0044     warning('off', 'Octave:array-as-scalar');
0045     warning('off', 'Octave:array-as-vector');
0046     if octave_ver_less_than('3.6')
0047         warning('off', 'Octave:string-concat');
0048     else
0049         warning('off', 'Octave:mixed-string-concat');
0050     end
0051     warning('off', 'Octave:variable-switch-label');
0052     warning('off', 'Octave:fortran-indexing');
0053 else
0054     % In MATLAB >= 7.7, don't display a warning if we use deprecated
0055     % interface to set seed of random number generators
0056     warning('off', 'MATLAB:RandStream:ActivatingLegacyGenerators');
0057 end

Generated on Wed 23-May-2012 02:40:54 by m2html © 2005