Azzera filtri
Azzera filtri

How do I recover a previous MATLAB Live Editor (.mlx file) version that went lost?

88 visualizzazioni (ultimi 30 giorni)
I would like to know if it's possible to recover previous version of a Live Editor file (.mlx file) which froze and caused the loss of the last 72h of code + text. Code could be recovered using the command history but the formatted text seems to be gone forever. The backup autosaver was on and all the versions of the file had been constantly saved. The file was open all the time. However, after a few hours from the last version, the script froze turning blank and reverted to a previous version dating back to 72h before. No idea how this crash might have happened.
Despite being on a Mac, I am not able to restore my document to the desired version (as suggested here: https://support.apple.com/en-gb/guide/mac-help/mh40710/mac). I also cannot find any temporary folders where the livescript autosaved (as suggested here: https://www.mathworks.com/matlabcentral/answers/570304-is-it-possible-to-recover-livescript-after-the-crash?s_tid=srchtitle).
Is there a way to fix this or I have to start over again?
Thanks!

Risposte (1)

Alejandro González
Alejandro González il 30 Giu 2023
I was haveing a similar problem (2019b), but my file had not been saved so far, I was working on 'Untitled.mlx'. Anyhow, if what you are care the most is the code, no the outputs. Try to do this:
  1. Write 'tempdir' in the command line, it will show you the location where temp files are stored by the system. In my case: 'C:/Users/username/AppData/Local/Temp'
  2. Go to the folder 'Editor' (in my case: 'C:/Users/username/AppData/Local/Temp/Editor')
  3. Here are stored different files with names starting: 'LiveEditorEvaluationHelper......'
  4. Open the one that has the date of modification closest to your issue.
  5. Done, it should be a recent version of your code (I don't know if there are also backup of already saved files and not just the 'Untitled.mlx').
  2 Commenti
Xize Ye
Xize Ye il 12 Apr 2024
hey there this is so so so helpful!!
honestly first day ever decided to start working with .mlx on my new desktop and after a full day of coding (honestly haven't done it in years) the power of my house just went completely off for 1 sec (also never happened since we moved in), what are the chances?
Did similar to what you suggested and was able to recover the code (not the text sadly) but it was already miles better than losing the text and the code.
Hope more people know this but also hope less people experience this situation... Wishing you all the best....

Accedi per commentare.

Categorie

Scopri di più su Programming in Help Center e File Exchange

Prodotti


Release

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by