title: Read from text file as a char array
body: <p>I want to read from a text file and process the text (compress incrept).
  I am using the <code>textread</code> function in MATLAB. My problem is that it is not reading the white spaces correctly.</p>
  
  <p>Here is the code:</p>
  
  <pre><code>w=textread('in.txt','%c','delimiter','\n','whitespace','');
  
  e=double(w);
  [z,x]=size(e);
  r=vec2mat(e,ceil(z/100));
  r=uint8(r);
  imwrite(r,'jocop.gif')
  [t,y]=norm2lzw(uint8(e),z);
  u=vec2mat(t,ceil(z/100));
  imwrite(double(u),'compro.gif')
  </code></pre>
  
  <p>You will notice that I am using <code>'%c'</code> in order to get a char array  and not a cell array, but I still cannot get the whitespaces. Any suggestions?</p>