title: automating loading of multiple *.mat files & matrix resize
body: <p>I have a ton of data that needs to be processed from lab work. I have a ton of .mat files that contain a signal matrix of dimensions 7 x w. I need to resize the matrix to 7 x N and w is larger and smaller than N to make the rest of the analysis easier (don't care about data past N). I have the psuedocode of how I want this to work but don’t know how to implement it. Any help would be great thanks!</p>
  
  <p>Folder structure of all my data:</p>
  
  <p>Main folder</p>
  
  <pre><code>Alpha 1
      1111.mat
      1321.mat
  Alpha 2
      1010.mat
      1234.mat
      1109.mat
      933.mat
  Alpha 3
      1223.mat
  </code></pre>
  
  <p>etc.</p>
  
  <p>Psudeocode:</p>
  
  <pre><code>    Master_matrix = []
      For all n *.mat
          Load n'th *.mat from alpha 1
          If w &gt; N
              Resize matrix down to N
          Else
              Zero pad to N
          End if
      Master_matrix = master_matrix .+ new resized matrix
      End for
  
  rest of my code...
  </code></pre>