Products & Services Solutions Academia Support User Community Company

Learn more about MATLAB   

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 path.

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

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

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