Z = imsubtract(X,Y)
subtracts each element in array Y from the corresponding
element in array X and returns the difference in the
corresponding element of the output array Z.
First array (minuend), specified as a numeric array or logical array of
any dimension.
Y — Second array numeric scalar | numeric array | logical array
Second array (subtrahend) to be subtracted from X,
specified as a numeric array or logical array of the same size and class as
X, or a numeric scalar of type
double.
Difference, returned as a numeric array of the same size as
X. Z is the same class as
X unless X is logical, in
which case Z is data type double. If
X is an integer array, then elements of the output
that exceed the range of the integer type are truncated, and fractional
values are rounded.
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.