title: Matlab saving file as name defined within other variable
body: <p>I want to load multiple variables into one .mat file at the end of a process loop. I have a simple line of code :</p>
  
  <pre><code>save draw.mat Output
  </code></pre>
  
  <p>but I cannot work out a way to code 'use the name given by variable X' instead of 'Output', so that I can loop the process and save multiple variables in draw.mat</p>
  
  <p>So then</p>
  
  <pre><code>X = 'Chocolate'
  </code></pre>
  
  <p>and the Variable name is saved as Chocolate.</p>
  
  <p>I am sure it is simple but I cannot find a solution on here!</p>