|
  
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:
If A is a single number and B is an array, every
element in B is subtracted from A:
If both A and B are arrays with the same
dimensions, the corresponding elements in A and B
are subtracted:
In all cases, elements are subtracted using complex
subtraction where appropriate:
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
|