title: Workspace from a .m file won't import into a simulink model. MATLAB
body: <p>I'm making a GUI with Matlab that runs an initialization file (full of variables), and then simulates a Simulink file with these variables. However, the Simulink model doesn't import these variables from the workspace into it so I get errors of undefined values, etc. Is there anyway to fix this? I'm not able to specifically tell the Simulink file what variables need to be used since I'm making this GUI for an overall usage of different initialization files/Simulink models, and the amount of variables from the initialization file is in the hundreds. </p>
  
  <p>Here is my code (brief):</p>
  
  <pre><code>open_system(fullfile_loadSimulink)
  
  run(fullfile_loadInitialization)
  
  run(fullfile_loadInitialization2)
  
  sim(fullfile_loadSimulink)
  </code></pre>
  
  <p>It's straight forward, the fullfileXXX is just the string and path to each file. This even works straight from the command line, so there must be something going on with the workspaces not matching up within the GUI.</p>
  
  <p>Thanks in advance.</p>