title: MATLAB read in excel data Loop
body: <p>I have the following in MATLAB:</p>
  
  <pre><code>data1 = xlsread('C:\Desktop\example.xlsx','PKA1');
  data2 = xlsread('C:\Desktop\example.xlsx','PKA2');
  </code></pre>
  
  <p>All the way up to 24.</p>
  
  <p>How can I create a loop to do this for me?</p>
  
  <p>This would create 24 variables: data1, data2, data3, etc. all corresponding to PKA1, PKA2, PKA3, etc.</p>
  
  <p>How can I create a loop that reads in data1, data2, without writing them all out?</p>