%function to partition the data into a larger number of symbols
function output_rate = transform_block_rate_into_8bit_char(block_rate)
%we start with block_rate
number_of_elements = length(block_rate); 
%starting positions

%starting output position
ind_output = 1;


for l = 1:number_of_elements
   
    if block_rate(l) < 255
       output_rate(ind_output) = block_rate(l);
       ind_output = ind_output + 1;
    else
       %If the number is greater than 255, the symbol must be separated into two words 
       binary_number = dec2bin(block_rate(l), 16); %Transform data into two 8 bit binary words
       
       letter1 = binary_number(1:8);
       letter2 = binary_number(9:16);     
       letter1 = bin2dec(letter1);
       letter2 = bin2dec(letter2);
       
       output_rate(ind_output) = letter1;
       ind_output = ind_output+1;
       
       output_rate(ind_output) = letter2;
       ind_output = ind_output +1;
    end    
    
end


