FACTORADIC

버전 1.1.0.0 (1.77 KB) 작성자: Darren Rowland
Obtain the factorial radix representation of a number.
다운로드 수: 934
업데이트 날짜: 2009/4/27

라이선스 보기

F = factoradic(M,N) returns the conversion of integer M into factorial radix. F is a 1-by-N vector. The factoradic is also known as the Lehmer Code. The factoradic of M is best understood by example.

Example: 89 = 3x4! + 2x3! + 2x2! + 1x1! + 0x0!
therefore factoradic(89,5) = (3,2,2,1,0)

M must lie in the range [0 : N!-1].
Leading zeros will be present in F when M < (N-1)!-1.

Example: factoradic(19,6) = (0,0,3,0,1,0)

A practical use of the factoradic is the generation of permutations. See ONEPERM on the File Exchange.

인용 양식

Darren Rowland (2024). FACTORADIC (https://www.mathworks.com/matlabcentral/fileexchange/23066-factoradic), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R14
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Design of Experiments (DOE)에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
버전 게시됨 릴리스 정보
1.1.0.0

Thanks to Stefano Bolli for noticing a typo in the error-checking.

1.0.0.0