Symbolic addition
plus
adds x
to each
element of the array.
syms x A = [x sin(x) 3]; A + x
ans = [ 2*x, x + sin(x), x + 3]
Add the identity matrix to matrix M
.
syms x M = [x x^2;Inf 0]; M + eye(2)
ans = [ x + 1, x^2] [ Inf, 1]
Alternatively, use plus(M,eye(2))
.
plus(M,eye(2))
ans = [ x + 1, x^2] [ Inf, 1]
syms f(x) g(x) f(x) = x^2 + 5*x + 6; g(x) = 3*x - 2; h = f + g
h(x) = x^2 + 8*x + 4
Add expression expr
to function f
.
syms f(x) f(x) = x^2 + 3*x + 2; expr = x^2 - 2; f(x) = f(x) + expr
f(x) = 2*x^2 + 3*x
All nonscalar arguments must be the same size. If
one input argument is nonscalar, then plus
expands
the scalar into an array of the same size as the nonscalar argument,
with all elements equal to the scalar.
ctranspose
| ldivide
| minus
| mldivide
| mpower
| mrdivide
| mtimes
| power
| rdivide
| times
| transpose