How can I get matlab back to the state it started in

3 views (last 30 days)
I am using my installation of matlab to generate guides and videos for our students using the software so each time, I need to be able to get matlab back to the state it starts in for the students i.e. as though it was making a fresh start with no variables, no functions, routines or scripts and the windows all set back to their original state.
Is there any way to do this other than reinstalling the software?

Accepted Answer

Walter Roberson
Walter Roberson on 23 Jan 2023
  • ensure that there are no files in the userpath (or at least no .m .mlx .mdl .slx .p .mex* .mlapp .project files)
  • delete prefdir (it will be recreated next time) -- do this while MATLAB is not running
  • be careful, something might have been saved to pathdef.m in toolbox/local/pathdef.m inside the installation directory.
  • restoredefaultpath and then savepath

More Answers (0)

Categories

Find more on Introduction to Installation and Licensing in Help Center and File Exchange

Products


Release

R2022b

Community Treasure Hunt

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

Start Hunting!