| Applying science to business management |
  
Add
Format: A + B
Arguments: [any] A, B Any real numbers,
complex numbers, vectors, or matrices to add or text strings to
concatenate
Returns: [num] Sum of A and B if both are
numbers, vectors, or matrices
(text) A string including A and B concatenated
together if either is a text string
Description: This operator serves two purposes: numeric
addition if both arguments are numbers, vectors, or matrices, and
text concatenation if either of the arguments is a string. When a
string is concatenated to a number, the number is first converted
into a string using the default number format.
Addition is carried out using one of the following methods as
is appropriate for the input data:
If A is an array and B is a number, B is
added to every element in A:
If A is a number and B is an array, A is
added to every element in B:
If both A and B are arrays with the same
dimensions, the corresponding elements in A and B
are added:
In all cases, elements are added using complex addition where
appropriate:
Examples: 3+4 = 7
(4+3*I)+(1-I) = 5+2i
[1,2,3,4]+10 = [11,12,13,14]
10+[1,2,3,4] = [11,12,13,14]
[1,2,3,4]+[1,2,3,4] = [2,4,6,8]
[[1,2],[3,4]]+[[1,2],[3,4]] =
[[2,4],[6,8]]
"concat"+"enate"
= concatenate
"X is "+3+4 = X is 34
"X is "+(3+4) = X is 7
See Also: Plus, Subtract
|