Locate MATLAB Class Definition File
11 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
DBFun
am 13 Okt. 2022
Kommentiert: DBFun
am 13 Okt. 2022
I've recently inherited responsibility for a MATLAB app that was built by an individual who is no longer with my company. The code for the app is organized into multiple layers of nested folders and package folders that contain various class definition files.
Rather than making full use of a package folder structure with appropriate import statements in the code, the app adds most of the folders to the MATLAB path with "addpath". That wouldn't normally be the end of the world, but in this case there are multiple package folders and class definition files with identical names that all wind up getting added to the path at various points in the code. This is causing some difficult to diagnose problems.
To help troubleshoot the issues, I would like a function that takes a single input argument in the form of an object and returns a string containing the file path to the class definition for that object. I know that MATLAB has the "which" command that does basically this exact thing for functions, but I haven't been able to figure out how to do it for an object. Any thoughts?
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Whos finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!