title: Bash read from file and store to variables in MATLAB
body: <p>I'm trying to read 2 floating numbers from a very simple 1-line file in Bash. I want to store these two numbers into variables. All the examples I see from Googling look like:</p>
  
  <pre><code>while read VAR1 VAR2
  do
     &lt;command&gt;
  done &lt; file.txt
  </code></pre>
  
  <p>But this keeps <code>VAR1</code> and <code>VAR2</code> inside the <code>while</code> loop only. How can I store the two variables so that I can use them anywhere in my script? Thanks so much!</p>