Locate MATLAB Class Definition File
조회 수: 10 (최근 30일)
이전 댓글 표시
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
채택된 답변
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Whos에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!