commands → subtract
subtract(A,B)
The subtract command subtracts vectors or matrices A and B with compatible dimensions.
Examples
# subtract vectors
subtract([1,2],[3,4]);
[-2,-2]
# subtract matrices
A = [[a,b],[c,d]];
B = [[e,f],[g,h]];
subtract(A,B);
[[a-e,b-f],[c-g,d-h]]