title: Can't open matlab file
body: <p>I have a ".mat" file supposedly containing a [30720000x4 double] matrix (values from accelerometers). When I try to open this file with "Import data" in Matlab I get the following error:</p>
  
  <pre><code>Error using load
  Can't read file F:\vibration_exp_2\GR_UB50n\bearing1\GR_UB50n_1_2.mat.
  
  Error using load
  Unknown text on line number 1 of ASCII file
  F:\vibration_exp_2\GR_UB50n\bearing1\GR_UB50n_1_2.mat
  "MATLAB".
  
  Error in uiimport/runImportdata (line 456)
                      datastruct = load('-ascii', fileAbsolutePath);
  
  Error in uiimport/gatherFilePreviewData (line 424)
          [datastruct, textDelimiter, headerLines]= runImportdata(fileAbsolutePath,
          type);
  
  Error in uiimport (line 240)
  [ctorPreviewText, ctorHeaderLines, ctorDelim] = ...
  </code></pre>
  
  <p>The filesize is 921MB which is the same as my other files that do open. I also tried opening the file using python, but no success. Any suggestions?  I use MATLAB R2013b .</p>
  
  <hr>
  
  <p><strong>More info:</strong></p>
  
  <p>How the file was create:</p>
  
  <pre><code>%% acquisition of vibration data
  % input:
  % sample rate in Hz (max. 51200 Hz, should be used as bearing 
  % faults are high-frequent)
  % time in seconds, stating the duration of the measurement 
  % (e.g. 600 seconds = 10 minutes)
  % filename for the file to be saved
  %
  % examples:
  % data = DAQ(51200, 600, 'NF1_1.mat'); 
  % data = DAQ(51200, 600, 'NF1_2.mat'); 
  function data = DAQ(samplerate,time,filename) 
  
  s = daq.createSession('ni'); % Creates the DAQ session
  %%% Add the channels as accelerometer channels (meaning IEPE is turned on)
  s.addAnalogInputChannel('cDAQ1Mod1','ai0','Accelerometer'); 
  s.addAnalogInputChannel('cDAQ1Mod1','ai1','Accelerometer'); 
  s.addAnalogInputChannel('cDAQ1Mod1','ai2','Accelerometer'); 
  s.addAnalogInputChannel('cDAQ1Mod1','ai3','Accelerometer'); 
  %s.addAnalogInputChannel('cDAQ1Mod2','ai0','Accelerometer'); 
  
  s.Rate = samplerate;
  s.NumberOfScans = samplerate*time; 
  %%% Defining the Sensitivities in V/g
  s.Channels(1).Sensitivity = 0.09478; %31965, top outer
  s.Channels(2).Sensitivity = 0.09531; %31966, back outer
  s.Channels(3).Sensitivity = 0.09275; %31964, top inner
  s.Channels(4).Sensitivity = 0.09363; %31963, back inner
  
  data = s.startForeground(); %Acquiring the data
  
  save(filename, 'data');
  </code></pre>
  
  <hr>
  
  <p><strong>More info:</strong></p>
  
  <p>When I open the file using a simple text editor I can see a lot of characters that do not make sense​ but also the first line:</p>
  
  <blockquote>
    <p>MATLAB 5.0 MAT-FILE, Platform: PCWIN64, Created on: Thu Apr 30
    16:29:07 2015</p>
  </blockquote>
  
  <hr>
  
  <p><strong>More info:</strong>
  The file itself: <a href="https://www.dropbox.com/s/r7mavil79j47xa2/GR_UB50n_1_2.mat?dl=0" rel="noreferrer">https://www.dropbox.com/s/r7mavil79j47xa2/GR_UB50n_1_2.mat?dl=0</a>
  It is 921MB.</p>
  
  <hr>
  
  <p><strong>EDIT:</strong></p>
  
  <p><strong>How can I recover my data?</strong></p>
  
  <p>I've tried <a href="http://www.mathworks.com/matlabcentral/answers/98890-how-do-i-recover-data-from-a-corrupt-mat-file" rel="noreferrer">this</a>, but got memory errors.
  I've also tried <a href="http://www.mathworks.com/matlabcentral/fileexchange/42274-loadfixnames-loads-a-mat-file--fixing-invalid-names" rel="noreferrer">this</a>, but it did not work.</p>