Skip to content. | Skip to navigation

Sections
Personal tools
You are here: Home Forum Using data sets hc-6 error in loading to Matlab

hc-6 error in loading to Matlab

Up to Using data sets

hc-6 error in loading to Matlab

Posted by Amin Rashidi at May 08. 2019

Hi,

 

I tried to load some of the mat files in the ch-6 data set to Matlab but I get the following error:

"Error using load

Unable to read MAT-file O:\...\tenrawpos02.mat. File might be corrupt."

Does it need an special script for loading the data to Matlab?

 

It would be greatly appreciated if someone can help me with that!

 

Re: hc-6 error in loading to Matlab

Posted by Jeff Teeters at May 11. 2019

I just tested and was able to load the file ok.  Matlab dialog is:

>> load tenrawpos02.mat

>> rawpos{2}{1}

ans = 

  struct with fields:

        data: [37341×5 double]

      fields: 'timestamp x1 y1 x2 y2'

    descript: {'position data from 7:47 to 28:34'}

 

I suspect the file you have is corrupted.  The size should match the following:

>> ls -l tenrawpos02.mat

-rw-r-x---  1 jt  staff  1080414 May 11 10:39 tenrawpos02.mat

 

md5 hash should be:

$ md5 tenrawpos02.mat 

MD5 (tenrawpos02.mat) = b680363ccc1fb32e61ef141b97f8a27d

 

If the size or md5 has do not match the above, the file is corrupt.  You need to delete the corrupt file and download it again.

There have been reports that the automatic download script sometimes downloads an html page rather than a data file, and that would cause it to fail when trying to load into matlab.  So if you using that script, maybe that is what happened.  If so,  just delete the corrupt file (containing the html) and run the download script again and it will download the file again.

Re: hc-6 error in loading to Matlab

Posted by Amin Rashidi at May 13. 2019

Thanks a lot Jeff,

I downloaded once more through the html page and I had the same problem. But, the problem is solved by downloading using the bash script.

 

Powered by Ploneboard
Document Actions