not a binary MAT-file
Show older comments
Hello eveyone
I have a file with .mat extension file which I cant load and I get the following errror:
Not a binary MAT-file. Try load -ASCII to read as text.
I tried using dlmread('') command and also tried addpath('') but none of them worked.
I am attaching the file.
load('._lim1020_x1100_y7140.089.19.Vectrino Profiler.00000_y_D=0.3.mat');
Could you help me with this?
Thanks
3 Comments
mehra
on 4 Nov 2021
Image Analyst
on 4 Nov 2021
Then zip it up and attach the zip file.
Image Analyst
on 7 Nov 2021
I'm still not seeing your mat file or zip file. Where is it?
Answers (1)
Yongjian Feng
on 4 Nov 2021
Edited: Yongjian Feng
on 4 Nov 2021
- Use matfile to read the file?
- On linux, try this from a terminal
hexdump -c your_matfile.mat | more
3. On Windows, try this from a terminal
format-hex your_matfile.mat | more
Post the first line here.
14 Comments
mehra
on 4 Nov 2021
Yongjian Feng
on 4 Nov 2021
Your file might not be a valid mat file. Try the commands above to show the first line of the file please.
mehra
on 4 Nov 2021
Yongjian Feng
on 4 Nov 2021
Try this:
certutil -encodehex your_matfile.mat tmp_mat.txt
It will generate a file called tmp_mat.txt. Open the file with Notepad and post the first 2 lines here.
mehra
on 4 Nov 2021
Yongjian Feng
on 4 Nov 2021
Your file name has spaces. Need to put quotes like this:
certutil -encodehex "your file name with space.mat" tmp_mat.txt
mehra
on 4 Nov 2021
Yongjian Feng
on 4 Nov 2021
You need to do it in the folder of that mat file. Or put the whole path.
Walter Roberson
on 4 Nov 2021
To be consistent with what you posted earlier,
certutil -encodehex "._lim1020_x1100_y7140.089.19.Vectrino Profiler.00000_y_D=0.3.mat" tmp_mat.txt
However, I see from your jpg that your attempt did not have the leading period and underscore. If those are part of the file name then they must be included.
Leading period is uncommon on Windows. On Mac and Linux it has special meaning when asking for directory listings (but no functional differences for the files.)
Yongjian Feng
on 4 Nov 2021
Good catch Walter.
mehra
on 7 Nov 2021
Yongjian Feng
on 7 Nov 2021
- Can you find the file from explorer?
- If so, can you make a copy, and call the new one just tmp.mat?
- from command line window, make sure you can dir tmp.mat
- now run the command
certutil -encodehex "tmp.mat" tmp_mat.txt
mehra
on 7 Nov 2021
Yongjian Feng
on 8 Nov 2021
Can you find it within matlab? You can do a copy and rename from matlab as well.
Categories
Find more on File Operations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!