- Scilab Online Help
- Files : Input/Output functions
- basename
- chdir
- copyfile
- createdir
- deletefile
- dir
- dirname
- dispfiles
- fileext
- fileinfo
- fileparts
- filesep
- findfiles
- fprintf
- fprintfMat
- fscanf
- fscanfMat
- fullfile
- fullpath
- get_absolute_file_path
- getdrives
- getlongpathname
- getrelativefilename
- getshortpathname
- %io
- isdir
- isfile
- listfiles
- listvarinfile
- ls
- maxfiles
- mclearerr
- mclose
- mdelete
- meof
- merror
- mfprintf
- mscanf
- mget
- mgetl
- mgetstr
- mkdir
- mopen
- movefile
- mput
- mputl
- mputstr
- mseek
- mtell
- newest
- pathconvert
- pathsep
- pwd
- removedir
- rmdir
- save_format
- scanf
- scanf_conversion
- sscanf
Please note that the recommended version of Scilab is 2025.0.0. This page might be outdated.
See the recommended documentation of this function
mgetl
read lines from an text file
Calling Sequence
txt=mgetl(file_desc [,m])
Arguments
- file_desc
a character string giving the file name or a logical unit returned by mopen
- m
an integer scalar. number of lines to read. Default value is -1.
- txt
a column vector of string
Description
mgetl
function allows to read a lines from an text file.
If m
is
omitted or is -1
all lines till end of file occurs are read.
If m
is given mgetl
tries to read exactly m lines. This
option is useful to sequentialy read part of a file. In this case if
an end of file (EOF) occurs before m
lines are read the read lines are
returned (it is possible to check if EOF had occured using the meof
function) issued.
mgetl
allows to read files coming from Unix, Windows, or Mac
operating systems.
mgetl
supports only UTF-8(NO-BOM) and ANSI file encoding.
Examples
Authors
S. Steer
<< mget | Files : Input/Output functions | mgetstr >> |