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
Cnv_encd.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 output=cnv_encd(g,k0,input)
- % cnv_encd(g,k0,input)
- % determines the output sequence of a binary convolutional encoder
- % g is the generator matrix of the convolutional code
- % with n0 rows and l*k0 columns. Its rows are g1,g2,...,gn.
- % k0 is the number of bits entering the encoder at each clock cycle.
- % input is the binary input seq.
- % Check to see if extra zero-padding is necessary.
- if rem(length(input),k0) > 0
- input=[input,zeros(size(1:k0-rem(length(input),k0)))];
- end
- n=length(input)/k0;
- % Check the size of matrix g.
- if rem(size(g,2),k0) > 0
- error('Error, g is not of the right size.')
- end
- % Determine l and n0.
- l=size(g,2)/k0;
- n0=size(g,1);
- % add extra zeros
- u=[zeros(size(1:(l-1)*k0)),input,zeros(size(1:(l-1)*k0))];
- % Generate uu, a matrix whose columns are the contents of
- % conv. encoder at various clock cycles.
- u1=u(l*k0:-1:1);
- for i=1:n+l-2
- u1=[u1,u((i+l)*k0:-1:i*k0+1)];
- end
- uu=reshape(u1,l*k0,n+l-1);
- % Determine the output
- output=reshape(rem(g*uu,2),1,n0*(l+n-1));