user813853
user813853

Reputation:

Is it possible to get all functions involved in function2 call on Matlab?

Is there a way to know the functions involved in a demo on Matlab ? I mean starting from a function/Script demo can I have a tree of all involved files/functions on the current demo that has been called by the demo.

Upvotes: 1

Views: 61

Answers (2)

RTL
RTL

Reputation: 3587

An alternative, possibly more interactive, way to have a look at what has been used is to use the profiler:

profile on -history

 % now run some code or function

profile off
profile viewer

not really what it was designed for but could be used in this way

Upvotes: 0

Divakar
Divakar

Reputation: 221504

Look into depfun.

Quote from the documentation -

depfun  Locate dependent functions of program file.
     TRACE_LIST = depfun(FUN) returns a cell array of files of the dependent
     functions of FUN.

Upvotes: 1

Related Questions