Skip to content

fileread

io · scripts/io/fileread.m

: txt = fileread (filename)
: txt = fileread (filename, "Encoding", enc)

Return the complete contents of the file filename as a character row vector. Every byte of the file becomes one character; line endings are not converted. The encoding name is validated but the bytes are returned unchanged.