I have a python script say script.py that I can call from the terminal no problem, in the middle of the script it unarchives a file using os.system('unar file'). However, when trying to run this script from matlab using system('python script.py') it runs, but then when it gets to the unar line, it states "sh:unar: command not found".
How is this possible? Isn't the matlab system command supposed to be the same as the terminal? Any help is appreciated.
$PATHthe same as a shell would. Does runningecho $PATHfrom the terminal produce the same output as runningsystem('echo $PATH')from inside MATLAB? Also of note is that MATLAB appears to be usingshinstead of bash, although I don't think that should be a problem in this case.