Let's say you have one or several M-file opened in the MATLAB Editor
Executing this code will change your current folder in the folder where
the active M-file is located
This very small script is very useful as a MATLAB shortcut
Aurelien Queffurust (2020). cdtofile (https://www.mathworks.com/matlabcentral/fileexchange/59544-cdtofile), MATLAB Central File Exchange. Retrieved .