gjheij / linescanning

Package for (pre)processing of anatomical and (linescanning) fMRI data
MIT License
12 stars 3 forks source link

matlab alias fix in call_bashhelper #4

Closed iverissimo closed 2 years ago

iverissimo commented 2 years ago

When calling matlab, current code assumes that there is an alias command matlab. Because I switched from zshell to bash, alias are not inherited and calling matlab would return command not found error message. My fix for this was to replace it with $MATLAB_DIR: $MATLAB_DIR -nosplash -nodisplay -batch "addpath('$(dirname ${1})'); $(basename ${1} .m)" | tail -n +${skip_lines} # suppress intro text This worked, not sure if best fix

gjheij commented 2 years ago

I definitely noticed that the matlab-command seems to vary across systems; not just the path to matlab, but also how to initiate it from the terminal (the -batch "addpath(...)" stuff). Need to add some instructions on how to invoke matlab from the terminal across different platforms