Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

dbstack

call stack.

Syntax

  • dbstack
  • st = dbstack()
  • dbstack('-completenames')
  • st = dbstack('-completenames')
  • dbstack('-completenames', omit)
  • st = dbstack('-completenames', omit)

Input argument

  • omit - an integer value: Number of frames to omit (must be positive).

Output argument

  • st - a struct

Description

dbstack displays the file names and line numbers of the function calls.

dbstack('-completenames') displays the full file names.

Example

Creates a myfun.m and calls it.

function myfun(x)
dbstack();
end

See also

which.

History

VersionDescription
1.0.0initial version

Author

Allan CORNET