matlab:matlab_path
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
matlab:matlab_path [2020/05/15 21:33] – igorkagan | matlab:matlab_path [2022/12/29 07:15] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 11: | Line 11: | ||
1. Custom startup folder set via MATLAB icon: (right click on the MATLAB icon | Properties | Start in ) (e.g. F: | 1. Custom startup folder set via MATLAB icon: (right click on the MATLAB icon | Properties | Start in ) (e.g. F: | ||
- | 2. Place custom startup.m to the [https:// | + | 2. Place custom startup.m to your [[https:// |
+ | (type ' | ||
- | Example startup.m: | + | For example, a minimal **startup.m** for automatically including all GitHub repositories (but excluding not needed internal .git folders) can be just: |
+ | |||
+ | <code matlab> | ||
+ | addpath(genpath_exclude(' | ||
+ | </ | ||
+ | |||
+ | **Note:** [[https:// | ||
+ | |||
+ | Example startup.m for GitHub repositoriesand Fieldtrip and NeuroElf from DAG server (Y:): | ||
+ | |||
+ | <code matlab> | ||
+ | disp(' | ||
+ | addpath(genpath_exclude(' | ||
+ | addpath(' | ||
+ | ft_defaults | ||
+ | |||
+ | % http:// | ||
+ | [ftver, ftpath] = ft_version; | ||
+ | rmpath(fullfile(ftpath, | ||
+ | rmpath(fullfile(ftpath, | ||
+ | rmpath(fullfile(ftpath, | ||
+ | |||
+ | addpath(' | ||
+ | |||
+ | dbstop if error | ||
+ | </ | ||
+ | |||
+ | |||
+ | ---- | ||
+ | |||
+ | See also https:// | ||
<code matlab> | <code matlab> | ||
Line 23: | Line 54: | ||
</ | </ | ||
- | The function **set_sources_path.m** can be something like the one below, to add all repositories but exclude .git folders: | + | The function **set_sources_path.m** can be something like the one below, to add all repositories but exclude |
<code matlab> | <code matlab> | ||
Line 29: | Line 60: | ||
</ | </ | ||
- | The minimal **startup.m** can be just: | ||
- | |||
- | <code matlab> | ||
- | addpath(genpath_exclude(' | ||
- | </ | ||
- | In this case, [https:// | + | ==== pathdef.m ==== |
- | See https://github.com/igorkagan/matlab_config | + | When MATLAB gives an " |
+ | [[https://www.mathworks.com/matlabcentral/answers/ | ||
matlab/matlab_path.1589578417.txt.gz · Last modified: 2022/12/29 07:15 (external edit)