setenv not working properly?

조회 수: 7 (최근 30일)
Guy Nir
Guy Nir 2017년 9월 19일
댓글: Guy Nir 2017년 9월 19일
Hi,
setenv and getenv used to work nicely for me, and enabled me to call other scripts using the unix command. recently it stopped working. Not sure when, but i am now using MATLAB 2017a, and mac OS Sierra 10.12.6.
For instance, from matlab command line:
unix('which perl') /bin/bash: which: command not found
ans =
127
While, from terminal:
which perl
/usr/bin/perl
Although i have defined the following on my startup.m: setenv('PATH','usr/bin:/usr/local/bin');
Does anyone know how to fix this? Thanks, Guy

채택된 답변

Walter Roberson
Walter Roberson 2017년 9월 19일
setenv('PATH','/usr/bin:/usr/local/bin')
You were missing a '/' before 'usr/bin'
  댓글 수: 1
Guy Nir
Guy Nir 2017년 9월 19일
Wow! I would have never notice that! Thank you!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Whos에 대해 자세히 알아보기

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by