Unable to load mat files

39 vues (au cours des 30 derniers jours)
SANJAY JOSEPH CHACKO
SANJAY JOSEPH CHACKO le 12 Jan 2023
I was working on analyzing a chunk of data and I accidentlally pressed ctrl-z multiple times inside the folder tree side window, I saw that most of my data was now gone. I managed to recover most of the data using a recovery software. However I am not able to load the .mat files. I have attached a single set of the .mat file. Thanks in advance for any help.
load matlab.mat
Error using load
Unable to read MAT-file /users/mss.system.BBorlN/matlab.mat. Not a binary MAT-file. Try load -ASCII to read as text.
  3 commentaires
SANJAY JOSEPH CHACKO
SANJAY JOSEPH CHACKO le 14 Jan 2023
Thanks @dpb. This has been really helpful.
dpb
dpb le 14 Jan 2023
Modifié(e) : dpb le 15 Jan 2023
Too bad don't have any better news...
I never use those features in the MATLAB UI so I don't really know what they do; looks like it probably actually wrote over the files from whatever was the preceding actions saved in the restore buffer...
Hopefully the scripts and raw data from which those .mat files were created are still around and you can reconstruct them.
To minimize such potential damage of inadvertent operator error, I have a routine that SAVEs the entire workspace with a current timestamp
% Backup current workspace to "WORKING ddMMMyyyy hhmm.mat"
fn="WORKING-"+string(datetime(now,'ConvertFrom','datenum','Format','ddMMMyyyy-HHmm'));
if exist('comment','var')
fn=fn+"-"+string(comment);
end
save(fn)
Then, at least the damage is limited to from the previous checkpoint and with command history recall, one can reconstruct a pretty complete history of actions since then (if don't neglect the use of the script).
This all works from the command line; what is saved to command history through the GUI UI route of operating MATLAB, I really can't say; just never have changed my working habits.

Connectez-vous pour commenter.

Réponses (1)

Animesh
Animesh le 3 Avr 2023
Hi,
The file you provided is most probably corrupt. This is the reason why you are getting an error while loading the file.

Catégories

En savoir plus sur Performance and Memory dans Help Center et File Exchange

Produits


Version

R2022a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by