time | Calls | line |
---|
| | 1 | function [st_root_path] = preamble(varargin)
|
| | 2 | %% PREAMBLE gets path to root and generates all path
|
| | 3 | % generate path by default, but when calling this from other functions to
|
| | 4 | % get st_root_path, do not generate path.
|
| | 5 |
|
< 0.001 | 1 | 6 | bl_gen_path = true;
|
< 0.001 | 1 | 7 | default_params = {bl_gen_path};
|
< 0.001 | 1 | 8 | [default_params{1:length(varargin)}] = varargin{:};
|
< 0.001 | 1 | 9 | [bl_gen_path] = default_params{:};
|
| | 10 |
|
| | 11 | %% Root Path
|
< 0.001 | 1 | 12 | st_root_path = 'C:/Users/fan/CodeDynaAsset/';
|
| | 13 |
|
| | 14 | %% Add to Path
|
| 1 | 15 | if (bl_gen_path)
|
| | 16 | rmpath(genpath(st_root_path))
|
| | 17 | addpath(genpath(st_root_path))
|
| | 18 | end
|
| | 19 |
|
< 0.001 | 1 | 20 | end
|