annotate _FullBNT/KPMtools/assert.m @ 9:4ea6619cb3f5 tip

removed log files
author matthiasm
date Fri, 11 Apr 2014 15:55:11 +0100
parents b5b38998ef3b
children
rev   line source
matthiasm@8 1 function assert(pred, str)
matthiasm@8 2 % ASSERT Raise an error if the predicate is not true.
matthiasm@8 3 % assert(pred, string)
matthiasm@8 4
matthiasm@8 5 if nargin<2, str = ''; end
matthiasm@8 6
matthiasm@8 7 if ~pred
matthiasm@8 8 s = sprintf('assertion violated: %s', str);
matthiasm@8 9 error(s);
matthiasm@8 10 end