How to search functions for mat use
Mostra commenti meno recenti
I am working in a somewhat large folder and am trying to find out which all files or functions call/use this "test.mat" file. Is there a command I can use to see where all it is used? I tried things like
which who(test.mat)
and
which test.mat -all
but the results only yielded the path
2 Commenti
Rik
il 11 Feb 2021
For m-files you can use a builtin tool (the dependency analyzer) to find which function is a parent function. This has the further limitation that it only works on file in the current folder.
You could use a tool like Notepad++ to search all m files for 'test.mat', but that might not even be enough, as load will also accept the filename without .mat, and functions could do something like S=load(dir('te*.mat').name).
hbcukid
il 12 Feb 2021
Risposta accettata
Più risposte (1)
Image Analyst
il 12 Feb 2021
0 voti
I'd type control-shift-F then tell it to search all m-files in some folder and subfolder for whatever you think it might look like, for examples, search for
test.m
test(
test
'test
or however else you might think "test" would appear in your code.
Categorie
Scopri di più su Search Path in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!