Adds two variables. It returns the sum of x and y. It is performed element-wise if the arguments are vectors, matrices or signals. Inputs must be of the same size and the same type unless one is a scalar. You can add a scalar value to any other type.
Syntax
x+y
Types
Variable Name | Value Type | Variable Type | ||
---|---|---|---|---|
Arguments: | x | real, complex | scalar, vector, matrix, signal, xy-data | |
y | real, complex | scalar, vector, matrix, signal, xy-data | ||
Result: | z | real, complex | scalar, vector, matrix, signal, xy-data |
Calculator Input
Use the
button to create the operation.Examples
Add Scalar to Scalar
ID | Description | Type | Value | Expression | |
---|---|---|---|---|---|
x | Argument | REAL | 2 | 2 | |
y | Argument | REAL | 3 | 3 | |
z | Result | REAL | 5 | x+y |
Add Scalar to Vector
ID | Description | Type | Value | Expression | |
---|---|---|---|---|---|
x | Argument | REAL VECTOR |
| [2, 2.5] | |
y | Argument | REAL | 3 | 3 | |
z | Result | REAL VECTOR |
| x+y |
Add Vector to Vector (Same Size)
ID | Description | Type | Value | Expression | |
---|---|---|---|---|---|
x | Argument | REAL VECTOR |
| [2, 2.5] | |
y | Argument | REAL VECTOR |
| [3, 3.5] | |
z | Result | REAL VECTOR |
| x+y |
Add Scalar to Matrix
ID | Description | Type | Value | Expression | |
---|---|---|---|---|---|
x | Argument | REAL MATRIX |
| [[2, 2.5, 3],[3.5, 4, 4.5]] | |
y | Argument | REAL | 3 | 3 | |
z | Result | REAL MATRIX |
| x+y |
Add Matrix to Matrix (Same Size)
ID | Description | Type | Value | Expression | |
---|---|---|---|---|---|
x | Argument | REAL MATRIX |
| [[2, 2.5],[1, 1]] | |
y | Argument | REAL MATRIX |
| [[1, 1],[3, 3.5]] | |
z | Result | REAL MATRIX |
| x+y |
Add Scalar to Signal
ID | Description | Type | Value | Expression | |
---|---|---|---|---|---|
x | Argument | REAL SIGNAL | signal([0, 0.5, 1],[1, 2, 3]) | ||
y | Argument | REAL | 1 | 1 | |
z | Result | REAL SIGNAL | x+y |
Add Signal to Signal (Same Size)
ID | Description | Type | Value | Expression | |
---|---|---|---|---|---|
x | Argument | REAL SIGNAL | signal([0, 0.5, 1],[1, 2, 3]) | ||
y | Argument | REAL SIGNAL | signal([0, 0.5, 1],[2, 3, 4]) | ||
z | Result | REAL SIGNAL | x+y |
Add Signal to Signal (Different Size)
ID | Description | Type | Value | Expression | |
---|---|---|---|---|---|
x | Argument | REAL SIGNAL | signal([0, 0.5, 1],[1, 2, 3]) | ||
y | Argument | REAL SIGNAL | signal([0, 0.25, 0.5, 1],[2, 3, 4, 5]) | ||
z | Result | REAL SIGNAL | x+y |
If the axes of abscissae are different, the signal is interpolated to the additional abscissa values by linear interpolation.