huffman.m

버전 1.0.0.0 (1.16 KB) 작성자: Sean Danaher
Huffman
다운로드 수: 16.6K
업데이트 날짜: 1998/6/4

라이선스 없음

[CODE,COMPRESSION]=HUFFMAN5(P)

P is the probability (or number of occurences) of each alphabet symbol
CODE gives the huffman code in a string format of ones and zeros
COMPRESSION gives the compression rate

Huffman5 works by first building up a binary tree (eg p =[ .5 .2 .15 .15])

Such that the tree always terminates at an alphabet symbol and the symbols furthest away from the root have the lowest probability. The branches at each level are labeled 0 and 1.

For this example CODE would be
1
00
010
011
and the compression rate 1.1111

인용 양식

Sean Danaher (2024). huffman.m (https://www.mathworks.com/matlabcentral/fileexchange/227-huffman-m), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R10
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Large Files and Big Data에 대해 자세히 알아보기
태그 태그 추가

Community Treasure Hunt

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

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