Mac tool box for the cause

broken image
broken image

The ft_hastoolbox function remembers (with a persistent variable) whether a certain toolbox has already been checked, and therefore does not check the same toolbox twice. You might be worried that this automatic path-checking and path-adding on every function call makes it slow. only when a function from one of those toolboxes is really needed. All other toolboxes in fieldtrip/external will only be added upon request, i.e. The ft_defaults function ensures that the required subdirectories such as fieldtrip/preproc and fieldtrip/fileio are added. The main FieldTrip functions such as ft_preprocessing and ft_freqanalysis all call the ft_defaults function at the beginning. If the toolbox “xxx” is not yet present, but the directory seems to be present in fieldtrip/external/xxx, then it will add that directory to your path. If the toolbox is present on your path, it will not add it once more.

broken image

for reading a specific data format such as CTF, or for performing a specific computation such as runica), it uses the ft_hastoolbox helper function to determine whether a toolbox is present. In case FieldTrip function needs additional functions (e.g. How to deal with toolboxes that FieldTrip uses? Restoredefaultpath addpath / home / common / matlab / fieldtrip ft_defaultsĪll other dependencies will subsequently be added automatically when needed.