See in your current folder (last current folder before closing), is there any .asv files in that folder. You may find your code in these files.
For editing matlab Autosave see: Preferences => Editor/Debugger => Autosave
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!