% function to simplfy text
% this only keeps letters and spaces
% and converts letters to uppercase
% letter are output as 1-26 and space as 27
% 
function plain_text=simplify_text(input_text)
   % keep only blanks and letters, convert to uppercase
   counter=0;
   for k=1:length(input_text)
       letter=input_text(k);
       if letter ==32
           counter=counter+1;
           plain_text(counter)=27;
       elseif letter== 46 
           counter=counter+1;
           plain_text(counter)=27;
       elseif (65<=letter)&&(letter<=90)
           counter=counter+1;
           plain_text(counter)=letter-64;
       elseif (97<=letter)&&(letter<=122)
           counter=  counter+1;
           plain_text(counter)=letter-96;
       end        
   end 
return
