dbtype - List M-file with line numbers

GUI Alternatives

As an alternative to the dbtype function, you can see an M-file with line numbers by opening it in the Editor.

Syntax

dbtype mfilename
dbtype mfilename start:end

Description

The dbtype command is used to list an M-file with line numbers, which is helpful when setting breakpoints with dbstop.

dbtype mfilename displays the contents of the specified M-file, with the line number preceding each line. mfilename must be the full path name of an M-file, or a MATLAB® relative partial pathname.

dbtype mfilename start:end displays the portion of the M-file specified by a range of line numbers from start to end.

You cannot use dbtype for built-in functions.

Examples

To see only the input and output arguments for a function, that is, the first line of the M-file, use the syntax

dbtype mfilename 1

For example,

dbtype fileparts 1

returns

1     function [path, fname, extension,version] = fileparts(name)

See Also

dbclear, dbcont, dbdown, dbquit, dbstack, dbstatus, dbstep, dbstop, dbup, partialpath

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS