title: Importing the result of a MATLAB numeric array into a new MATLAB script
body: <p>Consider that I have a code that returns a double array. When run, the result returned at the command window a result looks like this:</p>
  
  <pre><code>mpc.gen= 
  
         1 100 344 34 5
         2 433 223 45 2 
         3 333 432 12 3
         4 213 233 12 3
  </code></pre>
  
  <p>What I want to do is create a MATLAB script which would contain this array. In other words in this new MATLAB script I would have the following array, constructed like this:</p>
  
  <pre><code>mpc.gen= [ 1 100 344 34 5 ;
             2 433 223 45 2 ;
             3 333 432 12 3 ;
             4 213 233 12 3 ;
           ] ;
  </code></pre>
  
  <p>Just calling the function would save the variable in the new script, however that is not what I need since I need to use this script for a simulation at a special power tool called MATPOWER. The array needs to be in the form shown at the new script.</p>
  
  <p>The actual array is much bigger in size however I use this here for simplicity. Is there any way I can do this automatically, and not just pass the data from the command window to the new script one by one manually? Any help would be greatly appreciated. Thank you in advance for your time!</p>