Reputation: 5579
I would need to find all the places in my code (several M files in a folder) where I used a particular function (unique
in this case).
Do you know if it is possible?
Upvotes: 2
Views: 869
Reputation: 7817
If you want to check what functions you're using, depfun
allows you to do so, although it might be overkill if you only want to check for a single known function.
For example (checking functions called directly by a function only):
[list builtins] = depfun(fun, '-toponly');
Upvotes: 1
Reputation: 74940
In Matlab, there is the command "Find Files" - in the "Edit" menu, or on the "Home" and "Editor" ribbon - that allows you to find files containing specific text, either in a folder or on the entire Matlab path:
Upvotes: 6
Reputation: 23
"which" seems to do it.
Take a look at this: http://www.mathworks.co.uk/help/matlab/ref/which.html (1st example)
Otherwise, notepad++ allows you to search (and replace) multiple files for a text string, here's a simple tutorial: http://www.makeuseof.com/tag/how-to-find-and-replace-words-in-multiple-files/
Upvotes: 0