Get Object Variable Name inside the objects function

3 次查看(过去 30 天)
Hi,
I'm searching a way to retrieve an objects name within a function of the object itself (the name of the object in the workspace, not the classname!).
Any ideas? Thanks :)
P.S.: Googling this is really hard, you can imagine the keywords "Object" and "Name" are totally specific to this problem ;)

采纳的回答

Daniel Shub
Daniel Shub 2011-9-21
I think you are looking for inputname
doc inputname

更多回答(1 个)

Vincent
Vincent 2011-9-21
Thank you, that's exactly what I've been searching for!

类别

Help CenterFile Exchange 中查找有关 Variables 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by