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