title: MATLAB loop over string
body: <p>How to iterate over string in MATLAB to get characters for some calculations?</p>
  
  <p>I've got a gps data string:</p>
  
  <pre><code>str = "GPRMC,194325.802,A,5321.6802,N,00630.3372,W,0.02,31.66,140420";
  </code></pre>
  
  <p>Need to calculate hash of it by xor operation between characters.</p>