%% Subtract Two Arrays
% Create two arrays, A and B, and subtract the second, B, from the first, A.

A = [1 0; 2 4];
B = [5 9; 2 1];
C = A - B

% The elements of B are subtracted from the corresponding elements of A.
%
% Use the syntax -C to negate the elements of C.

-C

% Copyright 2012 The MathWorks, Inc.