Documentation

This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the page.

dbtype

Display file with line numbers

Syntax

Description

example

dbtype filename displays the contents of filename with line numbers preceding each line. This is helpful when setting breakpoints in a program file with dbstop. You cannot use dbtype to display the source code of built-in functions.

example

dbtype filename start:end displays the portion of the file starting at line numberstart and ending at line number end. To display a single line, you can specify only the start value.

Examples

collapse all

Display the example file buggy.m with line numbers preceding each line.

dbtype buggy
1     function z = buggy(x)
2     n = length(x);
3     z = (1:n)./x;

View the input and output arguments for an example function, buggy, by displaying the first line of the file. Since start and end are the same in this case, you can omit the end value.

dbtype buggy 1
1     function z = buggy(x)

Input Arguments

collapse all

File name, specified as a character vector. The file name can be a partial path, but must be in a folder on the search path or in the current folder. Otherwise, specify the full path name.

Starting line number, specified as a positive integer.

Ending line number, specified as a positive integer.

See Also

| |

Introduced before R2006a

Was this topic helpful?