debug_assert

debug_assert(cond, varargin)

debug_assert() - Calls assert() if and only if DEBUG_MODE is true.

debug_assert(cond)
debug_assert(cond, msg, A)
debug_assert(cond, errID, msg)
debug_assert(cond, errID, msg, A)

Calls assert() if global variable DEBUG_MODE exists and is true, otherwise skips the call to assert() and does nothing.

See also toggle_debug_mode(), assert.