www.pudn.com > matlab.rar > rs_channel.m, change:2004-05-13,size:537b

% 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