{
  "id": 10407,
  "title": "Error reading unzipped mat files",
  "url": "/competitions/seizure-prediction/discussion/10407",
  "author_name": "",
  "post_date": "2014-09-22T01:41:19.220Z",
  "votes": null,
  "comment_count": 4,
  "views": 1536,
  "content": "<p>I try to read the first file from the first archive &quot;Dog_1_interictal_segment_0001.mat&quot;, and both Octave and R.matlab give me errors.</p>\n<p>Octave:</p>\n<p>octave-3.6.4.exe:2&gt; load (&quot;Dog_1_interictal_segment_0001.mat&quot;)<br>error: load: invalid element type = 61440<br>error: load: trouble reading binary file 'Dog_1_interictal_segment_0001.mat'<br>error: load: invalid element type = 10<br>error: load: trouble reading binary file 'Dog_1_interictal_segment_0001.mat'<br>error: load: invalid element type = 2<br>error: load: trouble reading binary file 'Dog_1_interictal_segment_0001.mat'<br>error: load: invalid element type = 84<br>error: load: trouble reading binary file 'Dog_1_interictal_segment_0001.mat'<br>octave-3.6.4.exe:2&gt;</p>\n<p>R:</p>\n<p>&gt; dog1 &lt;- readMat (&quot;Dog_1_interictal_segment_0001.mat&quot;, maxLength = 1)<br>Error in mat5ReadTag(this) : <br> Unknown data type. Not in range [1,19]: 61440</p>\n\n<p>Do you have any idea where this &quot;61440&quot; comes from? When I open the file with Notepad, the first line looks like this:</p>\n<p>&quot;MATLAB 5.0 MAT-file, Platform: MACI64, Created on: Thu Aug 21 01:00:00 2014&quot;</p>",
  "messages": [
    {
      "id": "54394",
      "postDate": "09/22/2014 01:41:19",
      "content": "<p>I try to read the first file from the first archive &quot;Dog_1_interictal_segment_0001.mat&quot;, and both Octave and R.matlab give me errors.</p>\n<p>Octave:</p>\n<p>octave-3.6.4.exe:2&gt; load (&quot;Dog_1_interictal_segment_0001.mat&quot;)<br>error: load: invalid element type = 61440<br>error: load: trouble reading binary file 'Dog_1_interictal_segment_0001.mat'<br>error: load: invalid element type = 10<br>error: load: trouble reading binary file 'Dog_1_interictal_segment_0001.mat'<br>error: load: invalid element type = 2<br>error: load: trouble reading binary file 'Dog_1_interictal_segment_0001.mat'<br>error: load: invalid element type = 84<br>error: load: trouble reading binary file 'Dog_1_interictal_segment_0001.mat'<br>octave-3.6.4.exe:2&gt;</p>\n<p>R:</p>\n<p>&gt; dog1 &lt;- readMat (&quot;Dog_1_interictal_segment_0001.mat&quot;, maxLength = 1)<br>Error in mat5ReadTag(this) : <br> Unknown data type. Not in range [1,19]: 61440</p>\n\n<p>Do you have any idea where this &quot;61440&quot; comes from? When I open the file with Notepad, the first line looks like this:</p>\n<p>&quot;MATLAB 5.0 MAT-file, Platform: MACI64, Created on: Thu Aug 21 01:00:00 2014&quot;</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "54448",
      "postDate": "09/22/2014 11:31:46",
      "content": "<p>I initially had what sounds like the same problem. It turned out to be a problem with WinZip somehow corrupting the .mat files during decompression. When I used 7-Zip (<a href=\"http://www.7-zip.org/\">http://www.7-zip.org/</a>) instead, I then had no problem opening the decompressed .mat files.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "54468",
      "postDate": "09/22/2014 16:30:03",
      "content": "<p>if you have cygwin use &quot;tar xzvf filename.tar.gz&quot;</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "54498",
      "postDate": "09/23/2014 03:49:59",
      "content": "<p>Thank you, Trent and franklyn. Both methods work.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "56727",
      "postDate": "10/25/2014 11:02:43",
      "content": "<p>Hi, I had a similar problem. Renaming to *.tar.gz and using WinRar (definitely not WinZip!) fixed it :)</p>",
      "rawMarkdown": "",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 54448,
      "author_name": "trentb",
      "author_url": "",
      "post_date": "09/22/2014 11:31:46",
      "content": "<p>I initially had what sounds like the same problem. It turned out to be a problem with WinZip somehow corrupting the .mat files during decompression. When I used 7-Zip (<a href=\"http://www.7-zip.org/\">http://www.7-zip.org/</a>) instead, I then had no problem opening the decompressed .mat files.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 54468,
      "author_name": "franklyn",
      "author_url": "",
      "post_date": "09/22/2014 16:30:03",
      "content": "<p>if you have cygwin use &quot;tar xzvf filename.tar.gz&quot;</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 54498,
      "author_name": "mkozine",
      "author_url": "",
      "post_date": "09/23/2014 03:49:59",
      "content": "<p>Thank you, Trent and franklyn. Both methods work.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 56727,
      "author_name": "davidjames",
      "author_url": "",
      "post_date": "10/25/2014 11:02:43",
      "content": "<p>Hi, I had a similar problem. Renaming to *.tar.gz and using WinRar (definitely not WinZip!) fixed it :)</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "54394": "",
    "54448": "",
    "54468": "",
    "54498": "",
    "56727": ""
  },
  "source": "meta"
}