Vanguard Software
Forecasting & Planning Solutions
Home Products Solutions Services Customers Partners Company
 
Applying science to business management

contents.gifindex.gifprev1.gifnext1.gif

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:

  dph00414.gif

If A is a number and B is an array, A is added to every element in B:

  dph00415.gif

If both A and B are arrays with the same dimensions, the corresponding elements in A and B are added:

  dph00416.gif

In all cases, elements are added using complex addition where appropriate:

  dph00417.gif

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

  Demand Planning  |  Financial Forecasting
Forecasting Software  |  Strategic Planning Software  |  Decision Tree Software
Decision Support Software  |  Expert System Software  |  Online Surveys

Contact Us  |  Terms of Use  |  Privacy Policy  |  Site Map
Vanguard Software
© 2011 Vanguard Software Corporation
Print this page   Email this page to a friend