get used lines project matlab
Show older comments
Hello everybody,
I have a very big project in Matlab with a lot of functions and dependencies and my purpose is to try to simplify it the more as I can because I only want to execute and debug part of the project(but still should remain about 2000-3000 executed code lines!).
To achieve this and make mi live easier I would like to find a way to get the used code inside the project to be able at first unwrap all code to a only one script with the executed code. I want this also because the code pass a shared structure between functions for variables and configuration that I want to remove and leave just the configuration and variables and the beginning of the script.
the first attempt was to use the profile function to see the dependencies and used functions and extract the used code with the profile('info') command but I realized that after made my own functions to extract the used code for each one function inside my project the profiler doesn't take in account the end command and this make my code unusable and impossible to go file by file to see what's happening.
Another way was to try to debug the code line by line and run some kind of script inside the debugger to extract the evaluated lines but for me this was impossible due restrictions in debugger for running scripts and code with dbstep function and also a nightmare of levels and dependencies.
Any ideas?.
Thanks, regards.
Accepted Answer
More Answers (0)
Categories
Find more on Performance and Memory in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!