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
cp0402_2PAM_TH.m
Package: CP0402.zip [view]
Upload User: yuandalvye
Upload Date: 2013-07-19
Package Size: 3k
Code Size: 2k
Category:
Screen Saver
Development Platform:
Matlab
- %
- % FUNCTION 4.1 : "cp0402_2PAM_TH"
- %
- % Introduces the DS code given by 'DScode'
- % and implements binary PAM modulation
- % 'seq' is the input binary stream
- % 'fc' is the sampling frequency for the generated signal
- % 'Ts' is the average pulse repetition period
- % 'DScode' is the DS code
- %
- % The function generates two output streams:
- % 'PAMTHseq' is the output with both TH and PAM
- % 'THseq' is the output with TH only
- %
- % Programmed by Guerino Giancola
- %
- function [PAMTHseq,THseq] = ...
- cp0402_2PAM_TH(seq,fc,Tc,Ts,THcode)
- % --------------------------------------------------
- % Step One - Implementation of the PAM+TH modulator
- % --------------------------------------------------
- dt = 1 ./ fc; % sampling period
- framesamples=floor(Ts./dt);% number of samples between
- % pulses
- chipsamples = floor (Tc ./ dt); % number of samples for
- % the chip duration
- THp = length(THcode); % TH-code length
- totlength = framesamples*length(seq);
- PAMTHseq=zeros(1,totlength);
- THseq=zeros(1,totlength);
- % ---------------------------------------
- % Step Two - Main loop for introducing TH
- % ---------------------------------------
- for k = 1 : length(seq)
- % uniform pulse position
- index = 1 + (k-1)*framesamples;
- % introduction of TH
- kTH = THcode(1+mod(k-1,THp));
- index = index + kTH*chipsamples;
- THseq(index)=1;
- PAMTHseq(index)=((seq(k)*2)-1);
- end % for k = 1 : length(seq)