depuseTL
by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.5 - CODING/DEVELOP
Introduced first in SolidGeometry 3.3, Creation date: 2017-01-13, Last change: 2025-07-20
return which fncts in the current directory uses a named fnct
Description
in most cases "depuseString" is much faster but cannot distinguish code and comments and strings that are part of strings. depuseTL uses depuseString (which grep) before using
matlab.codetools.requiredFilesAndProducts
See Also: depuseTL2013
, depuseString
Example Illustration
Syntax
a=depuseTL(fname)
Input Parameter
fname: | | function to search for |
Output Parameter
Copyright 2017-2025 Tim C. Lueth. All rights reserved. The code is the property of Tim C. Lueth and may not be redistributed or modified without explicit written permission. This software may be used free of charge for academic research and teaching purposes only. Commercial use, redistribution, modification, or reverse engineering is strictly prohibited. Access to source code is restricted and granted only under specific agreements. For licensing inquiries or commercial use, please contact: Tim C. Lueth
Algorithm (Workflow)
This algorithm is designed to identify which functions in the current directory use a specified function, referred to as fname. It is part of the SolidGeometry library and was developed by Tim Lueth.
Input Parameters
- fname: The name of the function to search for within the current directory.
Output Results
- a: A list of functions that use the specified function
fname.
Algorithm Steps
- Use the
which function to determine the path of fname. If fname is not a MATLAB function, print an error message and suggest using depuseString instead.
- Call
depuseString with fname and true as arguments to get a preliminary list of files that might use fname.
- Determine the number of files
na and print a message indicating the analysis of these files.
- Initialize an array
ai to keep track of which files actually use fname.
- Iterate over each file in the list:
- Use
matlab.codetools.requiredFilesAndProducts to get a list of required files and products for each file, considering only the top-level dependencies.
- Calculate the progress percentage and print it if it exceeds the previous percentage by 5%.
- Check if
fname is among the required files for the current file. If so, mark it in ai.
- Filter the list
a to include only those files marked in ai.
- For each file in the filtered list, update its path using
which.
- Remove
fname from the list a to ensure it is not included in the results.
Algorithm explaination created using ChatGPT on 2025-08-19 07:13. (Please note: No guarantee for the correctness of this explanation)
Last html export of this page out of FM database by TL: 2025-08-09