- `logical (X)`

Convert the numeric object `X` to logical type.

Any nonzero values will be converted to true (1) while zero values will be
converted to false (0). The non-numeric value NaN cannot be converted and will
produce an error.

Compatibility Note: MthJSLab accepts complex values as input, whereas MATLAB
issues an error.

See also: `char`.

### References

- https://www.mathworks.com/help/matlab/ref/logical.html
- https://octave.sourceforge.io/octave/function/logical.html
- https://mathworld.wolfram.com/BooleanAlgebra.html
- https://mathworld.wolfram.com/BinaryOperation.html
- https://mathworld.wolfram.com/BinaryOperator.html
- https://mathworld.wolfram.com/TruthTable.html
- https://en.wikipedia.org/wiki/Truth_value
