Enhanced lcm: Least Common Multiple of N-Arguments of N Elements
Overview:
Provides the least common multiple of an arbitrary number of arguments, each with an arbitrary number of elements. Also handles the case of a single input without throwing an error by returning that input as the lcm. Multidimensional inputs will find the least common multiple of all elements used, and the computation time can grow exponentially.
Method:
The least common multiple must be a multiple of all numbers, by definition. Using that, it is simple to step through all multiples of the last input, stopping when the current multiple is divisible by all the other inputs. For prime inputs, the least common mulitple is the product of all the inputs, so this is used as an upper bound on the least common multiple.
인용 양식
David Guglielmo (2025). Enhanced lcm: Least Common Multiple of N-Arguments of N Elements (https://kr.mathworks.com/matlabcentral/fileexchange/55618-enhanced-lcm-least-common-multiple-of-n-arguments-of-n-elements), MATLAB Central File Exchange. 검색 날짜: .
MATLAB 릴리스 호환 정보
플랫폼 호환성
Windows macOS Linux카테고리
- MATLAB > Mathematics > Elementary Math >
태그
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!| 버전 | 게시됨 | 릴리스 정보 | |
|---|---|---|---|
| 1.0.0.0 | Better title |
