I am trying to put a large set of bash commands in a matlab script and manage my variables (such as file paths, options, etc.). This is also necessary because this workflow requires manual intervention at certain stages, and I would like to use a step debugger for this.
The problem is that I do not understand how the Matlab interface interacts with the bash shell. I can not do system('source .bash_profile')to define bash variables. In the same way, I cannot define them manually and read them, for example system('export var=somepath'), and then system('echo $var')returns nothing.
What is the correct way to define variables in bash inside a matlab command window? How can I create a workflow of commands that will use the variables defined by me, as well as those contained in my .bash_profile?
source
share