Borrar filtros
Borrar filtros

setenv not working properly?

7 visualizaciones (últimos 30 días)
Guy Nir
Guy Nir el 19 de Sept. de 2017
Comentada: Guy Nir el 19 de Sept. de 2017
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

Respuesta aceptada

Walter Roberson
Walter Roberson el 19 de Sept. de 2017
setenv('PATH','/usr/bin:/usr/local/bin')
You were missing a '/' before 'usr/bin'
  1 comentario
Guy Nir
Guy Nir el 19 de Sept. de 2017
Wow! I would have never notice that! Thank you!

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Get Started with MATLAB en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by