您好,欢迎访问三七文档
当前位置:首页 > 医学/心理学 > 医学现状与发展 > Huffman编码的matlab实现
题目Huffman编码的matlab实现学生姓名刘莉学号1109064011所在学院数学与计算机科学学院专业班级信息与计算科学指导教师权双燕完成地点陕西理工学院2015年06月05日陕西理工学院毕业设计IHuffman编码的matlab实现作者:刘莉(陕西理工学院数学与计算机科学学院信息与计算科学专业1101班,陕西汉中723000)指导老师:权双燕[摘要]通讯的实质是信息的传输,而高速度、高质量地传送信息却又是信息传输的问题.将信源信息通过信道传送给信宿,怎样才能做到既不失真而又快速呢?这需要解决两个问题:第一、在不失真或允许一定失真条件下,如何用尽可能少的符号来传送信源信息,以便提高信息传输率;第二、在信道受干扰的情况下,如何增加信号的抗干扰能力,同时又使得信息传输率最大.若接收端信宿要求无失真地精确复制信源输出的消息,这种表示是一一对应的,即保证信源产生的全部信息无失真地传送给信宿,这时的信源编码是无失真编码.信源无失真编码主要有等长编码和变长编码两种.等长编码效率低,一般不采用.变长编码具有很高的效率,被广泛的使用.常用的变长编码有Shannon编码和Huffman编码.这些编码方法含有大量的重复劳动,若信源符号个数巨大时,编码的工作量将成百倍地增加,单靠人工来完成,工作效率和编码的精确度将大大地降低.matlab是一种高性能的用于工程计算的编程软件.其编程语言简洁、紧凑,运算符十分丰富,语法限制不严格,程序设计自由度大,使用极为方便灵活.应用matlab编程实现Shannon编码和Huffman编码,将人类从烦琐,重复的劳动中解脱出来,大大提高了工作效率,编码的精确度也得到大大提高.本次毕业设计的意义在于使我们通过使用matlab工具来实现通信系统中霍夫曼编码的模拟设计,同时也使我们明白信源在调制前做编码的重要性.[关键词]霍夫曼编码;matlab;信源陕西理工学院毕业设计IIMatlabImplementationofHuffmanCodingAuthor:Liuli(Grade11,Class1,InformationandcomputingscienceMajor,MathematicsandComputingScienceDept,ShaanxiUniversityofTechnology,Hanzhong723000,Shaanxi)Tutor:QuanShuangyanAbstract:Informationtransmissionistheessenceofthecommunication,however,highspeedandhighqualityoftransmittedinformationisaproblemofinformationtransmission.Howtosendinformationtoreceiverbothnodistortionandfastthroughthechannel?Thisneedtosolvetwoproblems:thefirst,undertheconditionofnodistortionorcertaindistortionallowing,howtousesymbolstoconveyinformationasfewaspossible,inordertoimprovetheinformationtransferrate;thesecond,undertheconditionofthechannelinterference,howtoincreasetheanti-interferenceabilityofthesignal,atthesametime,maketheinformationtransferrateisthelargest.Ifthereceiveraskforcopyingtheinformationofoutputmessageexactly,thisrepresentationisone-to-one,whichensurethatalltheinformationtransfertoreceiverwithoutdistortion,thenthesourcecodeisundistortedcode.Sourceofundistortedcodingincludesisometriccodingandvariablelengthcoding.Isometriccodinghaslowefficiency,whichisnotused.Variablelengthcodinghashighefficiencyandhasbeenwidelyused.ShannoncodingandHuffmancodingarecommonlyusedinthevariablelengthcoding.Thesecodingmethodscontainalotofrepetitivelabor,ifthereisanumberofsourcesymbols,theworkloadwillbeincreasedbyahundredtimes,theworkefficiencyandaccuracyofthecodingwillbegreatlyreducedbytheartificialcompletion.Matlabisakindofprogrammingsoftwareforengineeringcalculation.Theprogramminglanguageissimple,compactandabundant,grammarlimitisnotstrict,thedegreeoffreedomofprogramdesignisverylarge,andtheuseoftheprogramisconvenientandflexible.UsingmatlabtorealizeShannoncodingandHuffmancoding,mankindwillbefreefromthetedious,repetitivework,theworkefficiencyandtheaccuracyofthecodearegreatlyimproved.ThesignificanceofthisgraduationprojectisthatweusethematlabtoolstoachievesimulationdesignoftheHuffmancodingincommunicationsystem,atthesametime,makeusunderstandtheimportanceofsourcemodulationbeforemodulation.keywords:Huffmancoding;matlab;source陕西理工学院毕业设计III目录1绪论...........................................................................11.1项目开发的背景.........................................................11.2项目发展的现状.........................................................11.3项目开发的目的.........................................................12编码的相关概念.............................................................12.1信息论基本概念.........................................................12.2编码的基本概念.........................................................23常用编码方法的介绍.......................................................33.1香农编码.................................................................33.2霍夫曼编码..............................................................33.3费诺编码.................................................................43.4各种编码方法的比较...................................................44霍夫曼编码..................................................................54.1二元霍夫曼编码原理...................................................54.1.1二元霍夫曼编码编码方法........................................54.1.2二元霍夫曼树的构造规则........................................54.2多元霍夫曼编码规则...................................................54.3扩展信源霍夫曼编码...................................................55用matlab实现Huffman编码..............................................75.1常用的matlab函数和基本运算........................................75.1.1常用的matlab函数................................................7陕西理工学院毕业设计IV5.1.2matlab中的基本运算.............................................75.2二元Huffman编码的程序流程图......................................95.3二元Huffman编码的过程说明.........................................95.4程序模块及相应程序代码.............................................105.4.1数据输入..........................................................105.4.2数据排序..........................................................105.4.3编码赋值..........................................................105.4.4分配码字..........................................................105.4.5输出结果..........................................................115.5程序设计结果及分析..................................................11结论.....................................................
本文标题:Huffman编码的matlab实现
链接地址:https://www.777doc.com/doc-6278291 .html