32

When I save a .m file in a folder, MATLAB autosaves a .asv file in the same folder.

I opened this file and I found that it contains my code from the beginning, ignoring what I have deleted.

  • What is the use of this file?
  • What's the risk if I delete that file?
Wolfie
  • 27,562
  • 7
  • 28
  • 55
Sepideh Abadpour
  • 2,550
  • 10
  • 52
  • 88

1 Answers1

47

A .asv file is just what you said, an "AutoSave" file. It's just there so that you don't lose all your code if your computer crashes/shutdown. You can delete it whenever you want.

If you find them annoying you can go to File/Preferences/-->"Editor/Debugger" --> Autosave and turn it off.

Smash
  • 3,722
  • 4
  • 34
  • 54
  • 10
    I strongly recommend that you do not delete them from explorer, but choose to delete them when Matlab's session ends (through preferences). Autosave can be a big saver if Matlab crashes... – Shai Feb 03 '13 at 14:18
  • 4
    Or you can use git, committing every small change – The Vivandiere Sep 23 '15 at 20:20