FUNCTION REFERENCE

lcm

Least common multiple.

Least common multiple.

Syntax

l = lcm(a, b)

Elementwise on positive integer-valued a and b (one may be a scalar).

Zero or negative inputs are errors.

Example

lcm(4, 6)   % 12

Differences from MATLAB: Real double and logical input only; exactly two

inputs.

These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.