Add path to top of MATLAB search paths only for current MATLAB session -
addpath(PATHNAME)
Same as the add path, but suitable for the following sessions -
savepath(PATHNAME)
Add all subdirectories for current MATLAB session -
addpath(genpath(PATHNAME))
Note. . You should be careful when adding paths, because if there are several function files with the same name, then that is higher on the path line.
More details here - addpath , savepath , genpath .
source share