# and

logical 'AND' operator, &

## Syntax

* C = and(A, B)
* C = A & B

## Input argument

* A - a variable
* B - a variable

## Output argument

* C - result of A & B

## Description

**C = and(A, B)** performs a logical **AND** operation.

## Example

```matlab
A = [6 8 0; 0 3 89; 15 0 0]
B = [66 56 0; 11 33 55; -11 0 0]
C = A & B
D = and(B, A)
C == D
```

## See also

[or](or), [xor](../logical/xor), [all](https://github.com/Nelson-numerical-software/nelson-gitbook/blob/master/en/operators/all.html), [any](https://github.com/Nelson-numerical-software/nelson-gitbook/blob/master/en/operators/any.html), [not](not).

## History

| Version | Description     |
| ------- | --------------- |
| 1.0.0   | initial version |

## Author

Allan CORNET
