自己看吧,这是matlab里面的函数 function intrlved = randintrlv(data, state)RANDINTRLV Reorder symbols using a random permutation.INTRLVED = RANDINTRLV(DATA, STATE) rearranges the elements of DATA using a random permutation. STATE is a scalar integer value from 0 to 2^32-1 that ...
inter=randintrlv(code,st2);%交织inter_err=bitxor(inter,errors);%加入突发错误deinter=randdeintrlv(inter_err,st2);%解交织decoded=decode(deinter,n,k,'hamming/binary');%译码disp('Number of errors and error rate, WITH interleaving:'); [number_with,rate_with]=biterr(msg,decoded)%误码数据%...
% inter_rs_code = randintrlv(source_coded_data_rs,st2); % Interleave. trellis = poly2trellis(7,[133 171]);%(2,1,7)卷积编码 输入一位,输出两位,约束长度为7,1011011-->133//1111001-->171 source_coded_data_con=convenc(source_coded_data_rs,trellis); %---调制--- data_temp1=reshape(...
msg = randint(k*500,1,2,st1); %信息序列 code = encode(msg,n,k,'hamming/binary'); %编码 %产生突发错误,使得相邻码字发生错误 errors = zeros(size(code)); errors(n-2:n+3) = [1 1 1 1 1 1]; inter = randintrlv(code,st2); %交织 inter_err = bitxor(inter,errors); %加入突发错...
inter = randintrlv(code,state); % BPSK 调制 s0 = sign(msg - 0.5); s1 = sign(inter-0.5); s2 = sign(code-0.5); % AWGN Channel add_noise0=awgn(s0,snr_db(x),'measured'); add_noise1=awgn(s1,snr_db(x),'measured');
[1 1 1 1 1 1];%WithInterleaving%---inter=randintrlv(code,st2); % Interleave.inter_err=bitxor(inter,errors); % Include burst error.deinter=randdeintrlv(inter_err,st2); %Deinterleave.decoded= decode(deinter,n,k,'hamming/binary'); % Decode.disp('Number of errors and error rate,...
message= randint(1,43200);% INFORMATION BITS H = dvbs2ldpc(2/3); l = fec.ldpcenc(H); codeword = encode(l,message); figure; stem(codeword(1:100)); xlabel('Samples'); ylabel('Amplitude'); title('LDPC encoding'); inter = randintrlv(codeword,64800); ...
ntrlv用矩阵按列填充,按行消减方法恢复符 号序列mati ntrlv用矩阵按列填充,按行消减方法重排符 号序列muxdei ntrlv按指定的移动寄存器恢复符号序列muxi ntrlv按指定的移动寄存器排列符号序列ran dde in trlv使用随机排列恢复符号序列randintrlv使用随机排列重排符号序列模拟调制与解调amdemod幅度解调ammod幅度调制fm...
(N,K);%产生生成式CODE,ADDED=rsenco(MSG,TP,K);%编码NOI=rand(length(CODE)/M,1) msg=randint(k*500,1,2,st1); code = encode(msg,n,k,hamming/binary); errors = zeros(size(code); errors(n-2:n+3) = 1 1 1 1 1 1; inter = randintrlv(code,st2); inter_err = bitxor(inter,...
计算机仿真Matlab通信系统链路级仿真 主要内容 •数字通信系统的组成 •2 •通信系统链路级仿真的一般性假设前提 •Matlab中的通信系统仿真资源 –信号处理工具箱及常用信号处理函数 –通信工具箱 –Simulink信号处理模块集 通信系统基本模型 •3 点到点数字通信系统基本模型 •4 更为一般的通信链路模型示意图...