Contents Previous Next Subchapters Current Chapters-> all mlmode_all any mlmode_any nnz equal fullprec isempty isequal isreal isnumscalar ischarmatrix ischarvector islogicalscalar isnummatrix isnumvector isfinite isinf isnan islight isrte isdeveloper Parent Chapters-> Omatrix6 elementary conditions all Search Tools-> contents reference index search

Determining if All Elements are True
 Syntax y` = all(`x`)` y` = all(`x`, `d`)` See Also Mlmode , any

Description
Determines if all of the elements of x are true where x is a logical matrix. ``` ```If d is not present, y is a logical scalar that is true if all of the elements of x are true. ``` ```If the argument d is the integer one, y is a logical row vector with the same column dimension as x. The j-th element of the y is true, if all of the elements in the j-th column of x are true. ``` ```If the argument d is the integer two, y is a logical column vector with the same row dimension as x. The i-th element of the y is true, if all of the elements in the i-th roe of x are true.

Example
If you enter ```      x = [ 0 2 0; 4 5 0 ]      all(x) ``` O-Matrix will respond ```      F ``` If you continue ```      all(x, 1) ``` O-Matrix will respond ```      [ F , T , F ] ``` If you continue ```      all(x, 2) ``` O-Matrix will respond ```      {      F      F      } ```