cd command not working

3 visualizaciones (últimos 30 días)
Jake Pfitsch
Jake Pfitsch el 6 de Ag. de 2018
Respondida: Fangjun Jiang el 6 de Ag. de 2018
I'm attempting to do very basic folder navigation, but it seems that my cd command is not functioning. I've done a simple command sequence:
>> test = cd
test = '/Users/myusername/Documents/MATLAB'
>> cd test
Error using cd: Cannot CD to test(Name is nonexistent or not a directory).
It seems that my version of matlab is not recognizing the full filename of its home directory? This doesn't make too much sense, especially when it functions normally just putting commands directly into the command line, but doesn't function when in script form. Help!

Respuesta aceptada

Fangjun Jiang
Fangjun Jiang el 6 de Ag. de 2018
cd(test)
cd('/Users/myusername/Documents/MATLAB')
cd /Users/myusername/Documents/MATLAB

Más respuestas (0)

Categorías

Más información sobre Startup and Shutdown en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by