Hello Anton,
You are totally free to add acados related to your ~/.bashrc or equivalent,
the env.sh was meant to work in the general case without requiring users to mess with their shell configuration files.
For more involved users the natural next step is to add lines or includes in ~/.bashrc
I would add something like:
export ACADOS_INSTALL_DIR=<your/acados/path/(the one cotaining lib/ and include/)>
export ACADOS_SOURCE_DIR=<your/acados_source/path>
# casadi and mex path
export MATLABPATH=$MATLABPATH:$ACADOS_SOURCE_DIR/external/casadi-matlab/
export MATLABPATH=$MATLABPATH:$ACADOS_SOURCE_DIR/interfaces/acados_matlab_octave/
export MATLABPATH=$MATLABPATH:$ACADOS_SOURCE_DIR/interfaces/acados_matlab_octave/acados_template_mex/
# acados shared library
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ACADOS_INSTALL_DIR/lib
# ocp description and non-linear functions libraries
MODELS=('<path/to/ocp1' '<path/to/ocp2>' '...' ) # assuming ocp descriptions are not necessarily in the acados/examples folder
for MODEL in "${MODELS[@]}"; do export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$MODEL/build; done
I agree this is not so “elegant”, but it the only thing we are aware of which can work with MATLAB,
if you know how to set those environment variables (in order to be accessible to the linker ) from MATLAB please let us know