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

contents.gifindex.gifprev1.gifnext1.gif

Subtract

Format: A - B

Arguments: [num] A, B Any real numbers, complex numbers, vectors, or matrices to subtract

Returns: [num] A minus B

Description: Subtraction 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 single number, B is subtracted from every element in A:

  dsc00213.gif

If A is a single number and B is an array, every element in B is subtracted from A:

  dsc00214.gif

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

  dsc00215.gif

In all cases, elements are subtracted using complex subtraction where appropriate:

  dsc00216.gif

Examples: 8-3 = 5

(4+3*I)-(1-I) = 3+4i

[11,12,13,14]-10 = [1,2,3,4]

10-[11,12,13,14] = [-1,-2,-3,-4]

[1,2,3,4]-[1,4,2,1] = [0,-2,1,3]

[[1,2],[3,4]]-[[1,4],[2,1]] = [[0,-2],[1,3]]

See Also: Minus, Add

  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