Using load function unexpectedly deleting original .mat file

6 views (last 30 days)
When I load variables into the workspace from a .mat file, MATLAB then deletes the original file.
Does anybody know why this is happening?
Thank you.
  4 Comments
Image Analyst
Image Analyst on 23 Aug 2017
Is that the bad code, or the circumvented/working code? I don't see any line of code that would delete a .mat file, unless main() does it internally.
Sam Firminger
Sam Firminger on 25 Aug 2017
Hello,
I found the bug. When I was saving a variable to a file elsewhere in the code, I was using the same filename which caused some issues. Nevertheless thank you for your help.

Sign in to comment.

Answers (0)

Categories

Find more on Environment and Settings in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!