Why lost original file?

3 views (last 30 days)
Hla Hla
Hla Hla on 6 Aug 2022
Answered: yanqi liu on 9 Aug 2022
I have trained trainnetwork. I save the workspace as a .mat file. When i called the load .mat file again, the data appear in my workspace. But program original file is lost. Why?
  2 Comments
dpb
dpb on 6 Aug 2022
There's at least an outside chance there might be an autosave file copy of the m-file -- look for files whose extension is ".asv" in the location you saved the original m-file.
Check if the default preferences for autosave have been modified -- there's a secton on backup files under the Editor/Debugger section...

Sign in to comment.

Answers (2)

Hla Hla
Hla Hla on 7 Aug 2022
Thanks

yanqi liu
yanqi liu on 9 Aug 2022
yes, sir, if you save the net to mat file,may be use save file.mat variable, such as save the cnn_model
save a.mat cnn_model
then load a.mat can get cnn_model
if just use
save a.mat
it auto save all variable to mat, if use load to get them, we can use
load('a.mat', 'cnn_model')
to get the target

Community Treasure Hunt

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

Start Hunting!