File name to display, specified as a character vector or a string.
filename can be an absolute or relative path and can
include a path and a file extension. type supports file
names with these extensions, files with any other extension are treated as
plain text.
File Extension
Description
.mlx
MATLAB Live Script — An interactive
document created using MATLAB Live Editor
.mlapp
MATLAB App File — An app created using
MATLAB App Designer
.m
MATLAB Code — A MATLAB script, function, or class
If you do not specify a file extension and a file without
an extension does not exist, then type assumes that the
extension is .mlx, .mlapp, or
.m. For example, if a file
myscript.m exists, then the command type
myscript displays the contents of that file.
type leverages automatic character set detection to
determine the file encoding for MATLAB code (.m) and other text files.
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window.
Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: United States.
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.