Skip to Main Content Skip to Search
Product Documentation

dbtype - List text file with line numbers

Alternatives

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

Syntax

dbtype filename
dbtype filename start:end

Description

The dbtype command is used to list a text file with line numbers, which is helpful when setting breakpoints in a MATLAB code file with dbstop.

dbtype filename displays the contents of the specified text file, with the line number preceding each line. filename must be the full path name of a file, or a MATLAB relative partial path.

dbtype filename start:end displays the portion of the 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 file, use the syntax

dbtype filename 1

For example,

dbtype addpath 1

returns

1     function oldpath = addpath(varargin)

See Also

dbclear | dbcont | dbdown | dbquit | dbstack | dbstatus | dbstep | dbstop | dbup

  


Free MATLAB Interactive Kit

Explore how to use MATLAB to make advancements in engineering and science.


Download free kit

Trials Available

Try the latest version of MATLAB and other MathWorks products.


Get trial software
 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS