assert.m
来自「一个关于adaboost算法的matlab程序,对开始接触adaboost研究的」· M 代码 · 共 30 行
M
30 行
function assert(Val, Text)
%
% checks a condition and aborts if it has been failed (Val==0)
% G. Raetsch 1.6.98
% Copyright (c) 1998 GMD Berlin - All rights reserved
% THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE of GMD FIRST Berlin
% The copyright notice above does not evidence any
% actual or intended publication of this work.
% Please see COPYRIGHT.txt for details.
global debug_assert ;
%dbstack ;
if isempty(debug_assert),
debug_assert=1 ;
elseif debug_assert==0,
return ;
end ;
if ~Val,
if nargin<2,
rep=sprintf('assertion failed (%i)', Val) ;
else
rep=Text ;
end ;
dbstack ;
error(rep)
end ;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?