Reputation: 2249
I have two matrix and want to get difference(Subtraction) b/w two matrix
e.g, IF
A = [2 4 6]
B = [1 1 1]
Answer should be
ans = [1 3 5] % A-B
Note: (Its not a set difference..)
Upvotes: 1
Views: 9769
Reputation: 50657
Just use one of the following in Matlab:
A-B
minus(A,B)
You will get:
ans =
1 3 5
Check out here for more info.
Upvotes: 6