-

Subtraction operator.

Syntax

R = A - B

Inputs

A
Type: double | integer | char | string | logical | struct | cell
Dimension: scalar | string | vector | matrix
B
Type: double | integer | char | string | logical | struct | cell
Dimension: scalar | string | vector | matrix

Outputs

R
The difference.

Examples

Scalar example:
R = 5 - 2
R = 3
Matrix minus example:
R = [1:3;4:6] - [4,1,2;6,5,2]
R = [Matrix] 2 x 3
-3  1  1
-2  0  4