Skip to content


Converting to a logical array.


  • A is an array of any data type (e.g., logical, numeric, or character).
  • It converts A to a logical array.
  • The output contains a logical zero (one) if the corresponding element of A has zero (non-zero) value.
  • A should not contain NaN values.
  • If A is a character array, it is first converted to a numeric array.
  • It returns an empty matrix if A is empty.