rs_channel.m

来自「(31,25)RS编码及解码matlab程序」· M 代码 · 共 14 行

M
14
字号
% a function to simulate the channel
% generate sequence after channel with the selected errors in the selected site
% 't_x' is the sequence input
% 'num' is the number of errors
% 'site' is a vector which elements are the sites of error
% 'value' is a vector which elements are the values of error in the very sites
function r_x=rs_channel(t_x,num,site,value)
r_x=t_x;
% add the very errors to the input sequence in the very sites
if num~=0
   for i=1:num
        r_x(site(i)+1)=rs_add(t_x(site(i)+1),value(i));
    end
end

⌨️ 快捷键说明

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