The following arithmetic operators are available, and work on scalars and matrices.
+
y .+
y+
.
-
y .-
y-
.
*
y .*
y /
y(inverse (y') * x')'
but it is computed without forming the inverse of y'.
If the system is not square, or if the coefficient matrix is singular,
a minimum norm solution is computed.
./
y \
yinverse (x) * y
but it is computed without forming the inverse of x.
If the system is not square, or if the coefficient matrix is singular,
a minimum norm solution is computed.
.\
y ^
y **
yThe implementation of this operator needs to be improved.
.^
y .**
y-
x+
x'
conj (x.')
.'
Note that because Octave's element by element operators begin with a ‘.’, there is a possible ambiguity for statements like
1./m
because the period could be interpreted either as part of the constant or as part of the operator. To resolve this conflict, Octave treats the expression as if you had typed
(1) ./ m
and not
(1.) / m
Although this is inconsistent with the normal behavior of Octave's lexer, which usually prefers to break the input into tokens by preferring the longest possible match at any given point, it is more useful in this case.
Return the complex conjugate transpose of x. This function is equivalent to
x'
.See also: transpose.
Return the element-by-element left division of x and y. This function is equivalent to
x .\ y
.
Return the matrix left division of x and y. This function is equivalent to
x \ y
.
Return the matrix power operation of x raised to the y power. This function is equivalent to
x ^ y
.See also: power.
Return the matrix right division of x and y. This function is equivalent to
x / y
.
Return the matrix multiplication product of inputs. This function is equivalent to
x * y
. If more arguments are given, the multiplication is applied cumulatively from left to right:(...((x1 * x2) * x3) * ...)At least one argument is required.
See also: times.
This function is equivalent to
x + y
. If more arguments are given, the summation is applied cumulatively from left to right:(...((x1 + x2) + x3) + ...)At least one argument is required.
See also: minus.
Return the element-by-element operation of x raised to the y power. This function is equivalent to
x .^ y
.See also: mpower.
Return the element-by-element right division of x and y. This function is equivalent to
x ./ y
.
Return the element-by-element multiplication product of inputs. This function is equivalent to
x .* y
. If more arguments are given, the multiplication is applied cumulatively from left to right:(...((x1 .* x2) .* x3) .* ...)At least one argument is required.
See also: mtimes.
Return the transpose of x. This function is equivalent to
x.'
.See also: ctranspose.