textread
(Not Recommended) Read data from text file; write to multiple outputs
textread
is not recommended. Use textscan
instead. For more information see Compatibility
Considerations.
Syntax
Description
[Var1,Var2,...,VarN] = textread(
reads data from the file filename
,format
)filename
into the variables
[Var1,Var2,...,VarN]
using the specified format, until the
entire file is read. textread
is useful for reading text files
with a known format. textread
handles both fixed and free
format files.
textread
matches and converts groups of characters from the
input. Each input field is defined as a group of non-whitespace characters that
extends to the next whitespace or delimiter character, or to the maximum field
width. Repeated delimiter characters are significant, while repeated whitespace
characters are treated as one.
[Var1,Var2,...,VarN] = textread(___,
specifies options using one or more Name,Value
)Name,Value
pair arguments, in
addition to any of the input arguments in the previous syntaxes.
Examples
Input Arguments
Name-Value Arguments
Version History
Introduced before R2006aSee Also
textscan
| fopen
| readmatrix
| fscanf