% dec=binm2dec(binm)
% Converts the binary matrix binm into a decimal number dec. 
% It is assumed that the elements of the matrix are ordered LSB to MSB.
%
% George Ginis, June 2001

function dec=binm2dec(binm)
  
  dec = 0;
  
  for i=1:length(binm)
    
    dec = dec+binm(i)*2^(i-1);
    
  end
  
