- `logical (X)`

Converte o objeto numérico `X` em tipo lógico.

Quaisquer valores diferentes de zero serão convertidos em verdadeiro (1),
enquanto valores zero serão convertidos para falso (0). O valor não numérico
NaN não pode ser convertido e produzirá um erro.

Nota de compatibilidade: MthJSLab aceita valores complexos como entrada,
enquanto
[MATLAB&reg;](https://www.mathworks.com/)/[Octave](https://www.gnu.org/software/octave/)
emite um erro.

Veja também: `char`.

### Referências

- 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://pt.wikipedia.org/wiki/Valor_de_verdade
