u-dales
u-dales copied to clipboard
Change `write_inputs.m` to a MATLAB function instead of a script
write_inputs.m currently has the experiment number for the preprocessing hardcoded, which is updated by the shell script write_inputs.sh and causes git to detect a file change every time the preprocessing is used. It also relies on the environmental variables "DA_EXPDIR" and "DA_TOOLSDIR". Re-writing it as a MATLAB function, it can take these parameters as input arguments instead, see https://uk.mathworks.com/matlabcentral/answers/388543-how-do-i-pass-a-shell-script-variable-as-an-argument-to-a-matlab-function.