Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
Uq_dist.m
Package: 现代通信系统matlab版源代码.zip [view]
Upload User: loeagle
Upload Date: 2013-03-02
Package Size: 1236k
Code Size: 1k
Category:
Communication Document
Development Platform:
Matlab
- function [y,dist]=uq_dist(funfcn,b,c,n,delta,s,tol,p1,p2,p3)
- %UQ_DIST returns the distortion of a uniform quantizer
- % with quantization points set to the centroids
- % [Y,DIST]=UQ_DIST(FUNFCN,B,C,N,DELTA,S,TOL,P1,P2,P3)
- % funfcn=source density function given in an m-file
- % with at most three parameters, p1,p2,p3.
- % [b,c]=The support of the source density function.
- % n=number of levels.
- % delta=level size.
- % s=the leftmost quantization region boundary.
- % p1,p2,p3=parameters of the input function.
- % y=quantization levels.
- % dist=distortion.
- % tol=the relative error.
- if (c-b<delta*(n-2))
- error('Too many levels for this range.'); return
- end
- if (s<b)
- error('The leftmost boundary too small.'); return
- end
- if (s+(n-2)*delta>c)
- error('The leftmost boundary too large.'); return
- end
- args=[];
- for j=1:nargin-7
- args=[args,',p',int2str(j)];
- end
- args=[args,')'];
- a(1)=b;
- for i=2:n
- a(i)=s+(i-2)*delta;
- end
- a(n+1)=c;
- [y,dist]=eval(['mse_dist(funfcn,a,tol',args]);