I'm having trouble with MATLAB's system() command on Mac OS High Safari. When I run 'which python3' in system(), I get this output:
>> [status, result] = system('which python3')status = 1result = 0×0 empty char array
However, when I run the same command on the same computer in Mac OS terminal, I get a better output:
$ which python3/Library/Frameworks/Python.framework/Versions/3.5/bin/python3
On the other hand, 'which python' works fine in both MATLAB's system() and in the Mac OS terminal. When invoked in MATLAB system():
>> [status, result] = system('which python')status = 0result = '/usr/bin/python '
When invoked in Mac OS terminal, I get a similar result:
$ which python/opt/local/bin/python
Can anyone help explain why I'm having trouble with "system('which python3')"?
Thanks in advance for your help.
Best Answer