Least common multiple
L = lcm(A,B)
A = [5 17; 10 60]; B = 45; L = lcm(A,B)
L = 2×2 45 765 90 180
A = uint16([255 511 15]); B = uint16([15 127 1023]); L = lcm(A,B)
L = 1x3 uint16 row vector 255 64897 5115
A,B— Input values
Input values, specified as scalars, vectors, or arrays of real,
positive integer values.
be any numeric type, and they can be of different types within certain
single, then the other can be of type
to an integer class, then the other must belong to the same class
or it must be a
double scalar value.
B must be the same
size or one must be a scalar.
[20 3 13],[10 6 7]
int16([100 30 200]),int16([20 15 9])
int16([100 30 200]),20
L— Least common multiple
Least common multiple, returned as an array of real positive
L is the same size as
and it has the same type as
B are of different
L is returned as the nondouble type.