How I can find the directory the script or function running now is

9 visualizaciones (últimos 30 días)
Yona
Yona el 20 de Mzo. de 2017
Comentada: Yona el 20 de Mzo. de 2017
I am running a script and i want to know the path it is with out using the script name.
The path is in 'matlabpath' so by using pwd i can get a different path. It is exist a way to know the directory of the running script or function(In running i mean that i what to use the command in the script to get the answer)?

Respuesta aceptada

Adam
Adam el 20 de Mzo. de 2017
Editada: Adam el 20 de Mzo. de 2017
doc mfilename

Más respuestas (0)

Categorías

Más información sobre Search Path en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by