title: How to print an array to a .txt file in Matlab?
body: <p>I am just beginning to learn <strong>Matlab</strong>, so this question might be very basic:</p>
  
  <p>I have a variable</p>
  
  <pre><code>a=[2.3 3.422 -6.121 9 4.55]
  </code></pre>
  
  <p>I want the values to be output to a .txt file like this:</p>
  
  <pre><code>2.3
  3.422
  -6.121
  9
  4.55
  </code></pre>
  
  <p>How can I do this?</p>
  
  <pre><code>fid = fopen('c:\\coeffs.txt','w'); //this opens the file
  //now how to print 'a' to the file??
  </code></pre>