cp0201_repcode.m
来自「利用压缩包内的5和函数产生PPM调制的UWB信号」· M 代码 · 共 17 行
M
17 行
%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 bits
%'repbits' represents the output binary sequence
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:Ns*(numbits-1)+1)=bits;
temp2=conv(temp1,temprect);
repbits=temp2(1:Ns*numbits);
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?