all

all(X) returns true if all of vector's X elements are non zeros.
If X is a matrix a logical row vector is returned with the i-th element indicating whether all of X i-th column elements are all non zero or not.

Examples

> all([0 0 4])

	[ans:false]
> all([1 2 3])

	[ans:true]
> all([1 2 0; 2 2 0; 1 0 0])#

	1 0 0
> all([1 2 0; 2 2 0; 1 0 0],2)#

	0
	0
	0

Resources

See also

any | prod | sum