Power a variable using a second variable. It returns the y-th power of x. The second argument must be either a scalar or the same type as the first argument and in case of both arguments are vectors, matrices or signals this operation is performed element-wise. You can use '**' as an alias to '^'.
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 complete the operation.Examples
Square Each Element of Matrix
ID | Description | Type | Value | Expression | |
---|---|---|---|---|---|
x | Argument | REAL MATRIX |
| [[1,2],[3,4]] | |
y | Argument | REAL | 2 | 2 | |
z | Result | REAL MATRIX |
| x^y |
Matrix^Matrix (Same Size)
ID | Description | Type | Value | Expression | |
---|---|---|---|---|---|
x | Argument | REAL MATRIX |
| [[1,2],[3,4]] | |
y | Argument | REAL MATRIX |
| [[2,2],[2,2]] | |
z | Result | REAL MATRIX |
| x^y |
Signal^Signal (Same Number of Channels)
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, 2, 2]) | ||
z | Result | REAL SIGNAL | x^y |