How to tell if a function is built-in or self-defined by its name?

foo*_*ool 1 matlab function built-in call-graph function-declaration

I generate a call graph of a complex MATLAB system, and I want to know which functions are built-in and mark them.

Rob*_*ert 5

Whether a function is built-in or not is most easily seen by the which command. For a given function name it displays the full path to the file that defines the function. For example, on my machine I see

>> which eig
built-in (/Applications/MATLAB_R2018b.app/toolbox/matlab/matfun/eig)
>> which solve
/Users/robert/Documents/MATLAB/cvx/lib/@cvxprob/solve.m  % cvxprob method
>> which nosuchfunctionhere
'nosuchfunctionhere' not found.
Run Code Online (Sandbox Code Playgroud)

telling me that eig is a built-in function, and solve a function that is part of the package cvx, and that nosuchfunctionhere is defined nowhere.