文件名称:huffman-code
介绍说明--下载内容来自于网络,使用问题请自行百度
程序的算法
1)先输入以下字符串和数组,其中sym为字符串中出现的信源符号,p为各符号出现的概率,seq为要进行编码的符号序列。如下所示:
2)初始各字符的区间:a[0,0.1),b[0.1,0.3),c[0.3,0.6),d[0.6,1.0)
3)利用以下公式计算区间的上下限:
Li+1=Li+rangei*r_L
Hi+1=Li+rangei*r_H
-Program Algorithm 1) to enter the following string and array of sym string of source symbols appear, p is the probability of each symbol appears, seq is a sequence of symbols to be encoded. As follows: 1) the initial interval of each character: a [0,0.1), b [0.1,0.3), c [0.3,0.6), d [0.6,1.0) 3) using the following formula to calculate the upper and lower intervals: Li+1 = Li+rangei* r_L Hi+1 = Li+rangei* r_H
1)先输入以下字符串和数组,其中sym为字符串中出现的信源符号,p为各符号出现的概率,seq为要进行编码的符号序列。如下所示:
2)初始各字符的区间:a[0,0.1),b[0.1,0.3),c[0.3,0.6),d[0.6,1.0)
3)利用以下公式计算区间的上下限:
Li+1=Li+rangei*r_L
Hi+1=Li+rangei*r_H
-Program Algorithm 1) to enter the following string and array of sym string of source symbols appear, p is the probability of each symbol appears, seq is a sequence of symbols to be encoded. As follows: 1) the initial interval of each character: a [0,0.1), b [0.1,0.3), c [0.3,0.6), d [0.6,1.0) 3) using the following formula to calculate the upper and lower intervals: Li+1 = Li+rangei* r_L Hi+1 = Li+rangei* r_H
(系统自动生成,下载前可以参看下载内容)
下载文件列表
huffman code(包括熵和平均码长)/huffman.m
huffman code(包括熵和平均码长)/prob.m
huffman code(包括熵和平均码长)
huffman code(包括熵和平均码长)/prob.m
huffman code(包括熵和平均码长)
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.