title: Arithenco and arithdeco not working with zeros
body: <p>Why does arithenco/arithdeco not work with an input sequence including zeros and is there a way to work around this?</p>
  <p>Example) Input message would be [2,1,2,1,2,0,0] and the decoded sequence is [3,2,3,2,3,1,2]. Whereas if I have an input message of [2,1,2,1,2,1,2], my decoded sequence is identical to the input as [2,1,2,1,2,1,2].</p>
  <p>Below is my testing code. I believe you'll need the Signal Processing ToolBox for the arithenco/arithdeco functions.</p>
  <pre><code>clc;
  clear all;
  close all;
  message = [2,1,2,1,2,0,1];
  
  %% Encoder
  table_size = height(message);
  rows = table_size(1);
  encodedY = [];
  for row = 1:rows
      coeff_row = message(row,:);
      % Calculate unique values
      source = unique(coeff_row);
      for i=1:length(source)
          counts(i)=length(strfind(coeff_row,source(i)));   
      end
      seq=zeros(1,length(coeff_row));
      for i=1:length(coeff_row)
          seq(i)=strfind(source,coeff_row(i));
      end
  
      % Get arithmetic code for the block
      code = arithenco(seq, counts);
  
      % Store the block's code
      encodedY = [encodedY; {code}];
  end
  
  %% Decoder
  decodedY = [];
  for row = 1 : size(encodedY)
      temp = cell2mat(encodedY(row,:));
      dseq = arithdeco(temp,counts,length(seq));
      decodedY = [decodedY;dseq];
  end
  %%
  </code></pre>