Get path from running app

45 visualizaciones (últimos 30 días)
Josep Llobet
Josep Llobet el 10 de Sept. de 2021
Comentada: Abolfazl Chaman Motlagh el 10 de Sept. de 2021
As we saw in Get path from runnig script to obtain in a automated way the path where our MATLAB file was running,
there is a comand for obatin the path of the execution of our MATLAB App?
The aim is used it in the StartupFcn function.
Thank you!
  4 comentarios
Josep Llobet
Josep Llobet el 10 de Sept. de 2021
@Abolfazl Chaman Motlagh, if you publish your answer I would be glad to mark it as Correct Answer
Abolfazl Chaman Motlagh
Abolfazl Chaman Motlagh el 10 de Sept. de 2021
glad to help
you can put local direction using pwd in your app.
imread([pwd '\imagesfolder\image.jpg'])

Iniciar sesión para comentar.

Respuesta aceptada

Abolfazl Chaman Motlagh
Abolfazl Chaman Motlagh el 10 de Sept. de 2021
if you mean path of location which the app comes up, can't you just use pwd?
i use it before in StartupFcn. and it work correctly even after compile for standalone desktop app.

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