Error using cd, Cannot CD
8 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Peiyao Zhao
el 12 de Jul. de 2020
Respondida: the cyclist
el 12 de Jul. de 2020
When I tried to run the following code in my matlab, it said" Error using cd, Cannot CD to( Name is nonexistent or not a directory), could you tell me why this happens, thank you very much!
if(~isdeployed)
cd(fileparts(which(mfilename)));
end
0 comentarios
Respuesta aceptada
the cyclist
el 12 de Jul. de 2020
This code works for me when mfilename is a file that exists in my path, but otherwise it gives that error. So, my guess is that you have an error in what is stored in mfilename.
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre File Operations 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!