FUNCTION REFERENCE

dbstack

Show the stack of named function and script calls.

Show the stack of named function and script calls.

Syntax

st = dbstack; st = dbstack(n); st = dbstack('-completenames'); [st, k] = dbstack; dbstack

Returns a column struct array with fields file, name and line, innermost call first. The argument n skips that many frames. At the command line the stack is empty.

Example

numel(dbstack)   % 0

Differences from MATLAB: dbstack omits anonymous function frames.

These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.