title: Does MATLAB keep some variables after clearing?
body: <p>I have a program that reads in a really large Excel file and creates some large variables.  This runs out of storage if I try to run it multiple times in a row, which makes sense, i.e.:</p>
  
  <p>large_program; large_program</p>
  
  <p>will crash. However, what I don't understand is why</p>
  
  <p>large_program; clear all; large_program </p>
  
  <p>will also crash; in order to run it multiple times, I have to restart MATLAB each time.  Does MATLAB not actually clear all variables?  Or is this a fragmentation of memory thing?</p>