How can a function find location of itself?
52 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Micke Malmström
el 13 de Jun. de 2016
Respondida: Walter Roberson
el 13 de Jun. de 2016
I want to save a file in the same location as the a function (ie not in the current folder). How can a function find get the location of itself?
(the file should handle being moved around, additionally, it will always be in some PATH)
0 comentarios
Respuesta aceptada
Walter Roberson
el 13 de Jun. de 2016
together with fileparts() to extract the directory portion, and fullfile() to construct the new file name.
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre File Name Construction 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!