Generalized Truth Table

버전 1.0.0.0 (2.2 KB) 작성자: Brian Moore
Creates truth tables of arbitrary base from binary to decimal
다운로드 수: 184
업데이트 날짜: 2013/11/18

라이선스 보기

This function will create a truth table matrix of arbitrary base and # of bits.

abTruthTable(base,bits)

Ex: abTruthTable(4,2)

ans =

0 0
0 1
0 2
0 3
1 0
1 1
1 2
1 3
2 0
2 1
2 2
2 3
3 0
3 1
3 2
3 3

I had trouble finding something simple for what I wanted, and figured someone else might want it as well. I mostly use it for to create Binary Truth Tables, but on occasion I need permutations of up to 10 values, so this is nice to have on hand.

Happy coding.

인용 양식

Brian Moore (2024). Generalized Truth Table (https://www.mathworks.com/matlabcentral/fileexchange/44367-generalized-truth-table), MATLAB Central File Exchange. 검색 날짜: .

MATLAB 릴리스 호환 정보
개발 환경: R2013a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux

Community Treasure Hunt

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

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