title: Matlab loop over variables (beginner)
body: <p>I would like to apply a function to several variables. Is there a nice way to do this?</p>
  
  <p>Like:</p>
  
  <pre><code>M = ones(2,2)
  N = zeros(3,3)
  M = M + 1
  N = N + 1
  </code></pre>
  
  <p>Works but I would like do something of the sort:</p>
  
  <pre><code>M = ones(2,2)
  N = zeros(3,3)
  L = ?UnknownStructure?(M, N)
  for i = 1:length(L)
      L(i) = L(i) + 1
  end
  </code></pre>
  
  <p>Or is there a better way entirely to apply a function to a set of variables?</p>