File Exchange

image thumbnail

Startup MATLAB in last working folder

version 1.3.0.1 (2.92 KB) by Michelle Hirsch
Directions for having MATLAB® start in the last working folder.

1 Download

Updated 01 Sep 2016

View License

Editor's Note: This file was selected as MATLAB Central Pick of the Week

This submission provides directions on how to instruct MATLAB to begin in the final working directory from the previous session of MATLAB.
There are no m-files included with this submission, just directions on how to modify startup.m and finish.m
Note: This capability was introduced directly into MATLAB, so these directions are no longer as of R2014b. There is now a preference (Preferences -> MATLAB -> General) to specify the initial working folder as the last working folder from your previous MATLAB session.

Comments and Ratings (9)

José Lugo

Thank you, I added "clear lwd" as suggested and works.

Les Beckham

Very handy! Nice work Michelle.

One suggestion: add 'clear lwd' at the end of the commands in startup.m to leave a clean workspace.

Thanks.

Ryan

Thanks!

Paijit K

It works well. Thanks

Dimas Mavares

Easy and useful tip

dharanivarma raju

Fahad Al Mahmood

Simple trick but cute and usefull! Thanks Scott!

Updates

1.3.0.1

Updated license

1.3.0.0

Added note that there's a preference to control this introduced in R2014b.

1.2.0.0

Removed mistaken attribution.

1.1.0.0

Updated copyright.

MATLAB Release Compatibility
Created with R13
Compatible with any release
Platform Compatibility
Windows macOS Linux
Acknowledgements

Inspired: Restore Last Working Directory