title: How to load .mat file and convert it to .csv file?
body: <p>I wanted to load .mat file and to convert it to .csv file. </p>
  
  <p>This is for MacOS terminal, running python3.7. In the past I've loaded .csv and .dat files.
  Following is the code I wrote to write for above task.</p>
  
  <pre class="lang-py prettyprint-override"><code>mat_274 = load('ecgca274_edfm.mat')
  T = struct2table(mat_274)
  writetable(T, 'ecgca274_edfm.csv', 'Delimiter', ',')
  print(mat_274)
  </code></pre>
  
  <p>After running the above code, I'm getting following error</p>
  
  <pre><code>Traceback (most recent call last):
    File "bayesian3.py", line 1, in &lt;module&gt;
      mat_274 = load('ecgca274_edfm.mat')
  NameError: name 'load' is not defined
  </code></pre>
  
  <p>Can anyone help to correct errors or suggest a new way for this conversion task ? Thank you</p>