.. highlightlang:: us .. _all: all === .. index:: all .. us.tag all ENGLISH math-base :ref:`all` checks if all elements of a vector or matrix are other than zero (0). .. function:: r = all(m) .. us.return **Return Value** *r* is a real row vector, when *m* is a matrix. *r* is a scalar, when *m* is a vector or scalar. .. us.params **Parameters** .. uparam:: m *m* is a real matrix, vector or scalar. .. us.comment **Comment** The argument must be real. In order to check if all elements of a complex vector are other than zero, calculate their absolute values. If the argument is a vector, *all* will return TRUE (1) if one or more elements are not equal to zero (i.e. TRUE). If the the argument is a matrix, *all* will return a column vector. .. us.example **Example** :: * a = [0,1,1; ... 0,0,1] * all(a) 0 0 1 .. seealso:: :ref:`overview-mathematic`, :ref:`any` :sub:`id-335656`