⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cp0201_repcode.m

📁 matlab仿真,超宽带信号中,等概率二进制产生,重复码编码,th编码,PPM-TH调制,脉冲形成器,PPM-TH发射器等源程序.
💻 M
字号:
%
% FUNCTION 2.2 : "cp0201_repcode"
%
% Introduces a repetition code for the stream of 'bits' in
%  input:
% 'Ns' identical binary values are generated from the same
%  bit
% 'repbits' represents the output binary sequence
%
% Programmed by Guerino Giancola
%

function [repbits]=cp0201_repcode(bits,Ns)

% ----------------------------------------------
% Step One - Introduction of the repetition code
% ----------------------------------------------

numbits = length(bits);

temprect=ones(1,Ns);
temp1=zeros(1,numbits*Ns);
temp1(1:Ns:1+Ns*(numbits-1))=bits;
temp2=conv(temp1,temprect);
repbits=temp2(1:Ns*numbits);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -