title: How to load variables from struct into Matlab workspace?
body: <p>Suppose I have access to a struct that was created using the <code>load</code> function:</p>
  
  <pre><code>structWithVariables = load('data.mat');
  </code></pre>
  
  <p>I want to load all the variables from this struct into workspace, but I cannot find any way of doing that without hardcoding the names of all variables.</p>
  
  <p>Note: I don't have access to the .mat file, nor the code that loads the struct, I really only have the struct.</p>
  
  <p>Note 2: the reason I want to do that is just to use some code that references the variables as if they are in the workspace. I don't want to change the code.</p>