title: How to export data from matlab into a text file
body: <p>I have multiple arrays of data, out of which only x,y and z arrays are required to be exported as text. I know how to export a single array, but am unable to export the 3 columns of data as text file.
  please help, I tried with the following..</p>
  
  <pre><code>        fid = fopen('g.txt','w');
          fprintf(fid,'%f \n',x,y,z);
          fclose(fid);
  </code></pre>