Enhanced lcm: Least Common Multiple of N-Arguments of N Elements

버전 1.0.0.0 (1.81 KB) 작성자: David Guglielmo
Provides the least common multiple for an arbitrary number of variable-size arguments.
다운로드 수: 83
업데이트 날짜: 2016/2/23

라이선스 보기

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 릴리스 호환 정보
개발 환경: R2012a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Elementary Math에 대해 자세히 알아보기
태그 태그 추가
lcm

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