Getting name of the running script from inside the class.
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I know that normally you can use mfilename to find the name and address of the file currently running.
I need something a little different: I need the name of the file constructing an instance of the class. I need that filename inside the class body (and of course I want to avoid adding additional argument for passing that filename.)
If I use mfilename inside the class it will obviously return class file which is not useful for me. dbstack seems to be my only option but I don't like it since it seems like the function was not intended for this use case.
Thanks.
0 Commenti
Risposte (0)
Vedere anche
Categorie
Scopri di più su Argument Definitions in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!