Info
This question is closed. Reopen it to edit or answer.
Files disappear after using Arduino support package
1 view (last 30 days)
Show older comments
I am using the Arduino Uno Support Package in R2014a. I have successfully tried out a few Simulink programs with no more serious problems than the icons in the Simulink library occasionally disappearing. However, when I go back to look at my work on a different date, I find the directory in which I had saved my files completely empty.
Mindful of this problem, last time I made regular manual backups by copying my folder in Windows Explorer. Today I looked at the copied folders, and they contain all the my files and the additional directories created when Simulink builds the file. But the original working directory is completely empty - no files, no directories, nothing.
This problem is so strange that I don't even know where to begin to diagnose the issue. I suppose I should experiment to find out exactly when the files disappear (right when I shut down MATLAB?), whether additional (say text) files in the folder are deleted too, and whether working in multiple directories causes them all to be deleted or just one.
Has anyone else seen this problem and figured out what is going on?
0 Comments
Answers (1)
Star Strider
on 2 Aug 2014
‘the original working directory is completely empty - no files, no directories, nothing’
How did you look for them? Did you look in the MATLAB file path or using File Explorer? (I know you found your saved files in File Explorer, but did you also search in your MATLAB directories for them with it?
The reason I’m curious about this is that the fact that some MATLAB-associated function created them doesn’t mean that it permanently added them to the MATLAB file path. They may be where you (or the application) created them, simply not available to you.
Wild guess here, but if that is the situation, consider using the savepath function before you exit MATLAB.
2 Comments
Star Strider
on 4 Aug 2014
My pleasure. Using savepath is the only possibility I can think of. It would at least allow you to access the directories you created. You can also use the movefile function to create automatic backups in a separate directory in the same finish.m file. You could then create a separate function to run optionally or as part of your startup.m file to check for their existence in the directories you created them in, and copy them back if they’re missing. Your backup directory would not have to be in the MATLAB search path, so long as your functions know where to look.
I can’t imagine why your Simulink files disappeared, though. I don’t use Simulink often enough to have ever encountered this problem. I suggest you report this behavior to TMW as a bug. At least they might have a fix or at least an explanation and a workaround for it.
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!