I take it you mean you want to see exactly how your code is running - what functions call what subfunctions, when, and how long those run for?
Take a look at the MATLAB Code Profiler. Execute your code as follows:
>> profile on -history; MyCode; profile viewer
>> p = profile('info');
p contains the function history, From that same help page I linked above:
The history data describes the sequence of functions entered and exited during execution. The
profile command returns history data in the
FunctionHistory field of the structure it returns. The history data is a 2-by-n array. The first row contains Boolean values, where
0 means entrance into a function and
1 means exit from a function. The second row identifies the function being entered or exited by its index in the
FunctionTable field. This example [below] reads the history data and displays it in the MATLAB Command Window.
profile on -history
p = profile('info');
for n = 1:size(p.FunctionHistory,2)
str = 'entering function: ';
str = 'exiting function: ';
You don't necessarily need to display the entrance and exit calls like the above example; just looking at
p.FunctionHistory will suffice to show when code enters and exits functions.